Statistics
| Branch: | Revision:

root / target-s390x @ 5b50e790

# Date Author Comment
986a2998 07/27/2013 01:04 am Andreas Färber

gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions

This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.

Semi-automatic conversion using, e.g.,
sed i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target*/gdbstub.c...

5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

Acked-by: Michael Walle <> (for lm32)
Acked-by: Max Filippov <> (for xtensa)
Signed-off-by: Andreas Färber <>

cfae5c90 07/27/2013 01:04 am Andreas Färber

target-s390x: Move cpu_gdb_{read,write}_register()

Signed-off-by: Andreas Färber <>

a0e372f0 07/27/2013 12:23 am Andreas Färber

cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs

CPUState::gdb_num_regs replaces num_g_regs.
CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.

Allows building gdb_register_coprocessor() for xtensa, too.

As a side effect this should fix coprocessor register numbering for SMP....

9282b73a 07/27/2013 12:05 am Christian Borntraeger

target-s390x: Fix CPUState rework fallout

Commit f17ec444c3d39f76bcd8b71c2c05d5754bfe333e
exec: Change cpu_memory_rw_debug() argument to CPUState

missed to update s390x KVM code, breaking the build.

Let's fix it up.

Signed-off-by: Christian Borntraeger <>...

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

bdf7ae5b 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

ed2803da 07/23/2013 03:41 am Andreas Färber

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

f45748f1 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

Signed-off-by: Andreas Färber <>

a0762859 07/09/2013 10:33 pm Andreas Färber

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

91b1df8c 07/09/2013 10:33 pm Andreas Färber

cpu: Move reset logging to CPUState

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

d9916c23 07/09/2013 10:33 pm Andreas Färber

target-s390x: Change gen_intermediate_code_internal() argument to S390CPU

Also use bool type while at it.

Prepares for moving singlestep_enabled field to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

19079e46 07/09/2013 10:33 pm Andreas Färber

target-s390x: Don't overuse ENV_GET_CPU()

Commit 3474b679486caa8f6448bae974e131370f360c13 (Utilize selective
runtime reg sync for hot code paths) introduced two uses of
ENV_GET_CPU() inside target-s390x/ KVM code. In one case we can use a
direct CPU cast instead....

4fd6dd06 07/09/2013 10:33 pm Andreas Färber

target-s390x: Change handle_{hypercall,diag}() argument to S390CPU

This allows to get rid of the last remaining ENV_GET_CPU() in
target-s390x/ by using CPU cast directly on the argument.

Cc: Jason J. Herne <>
Signed-off-by: Andreas Färber <>

6291ad77 07/09/2013 10:20 pm Peter Maydell

linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-user

The functions cpu_clone_regs() and cpu_set_tls() are not purely CPU
related -- they are specific to the TLS ABI for a a particular OS.
Move them into the linux-user/ tree where they belong....

6e42be7c 07/09/2013 10:20 pm Andreas Färber

cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

A transition from CPUFooState to FooCPU can be considered safe,
just like FooCPU::env access in the opposite direction.
The only benefit of the FOO_CPU() casts would be protection against
bogus CPUFooState pointers, but then surrounding code would likely...

cc3ac9c4 07/01/2013 12:00 pm Cornelia Huck

virtio-ccw: fix build breakage on windows

event_notifier_get_fd() is not available on windows hosts. Fix this by
moving the calls to event_notifier_get_fd() to the kvm code.

Reported-by: Stefan Weil <>
Reviewed-by: Paolo Bonzini <>...

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

cb446eca 06/28/2013 02:25 pm Andreas Färber

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

b4436a0b 06/25/2013 06:11 pm Cornelia Huck

virtio-ccw: Wire up ioeventfd.

On hosts that support ioeventfd, make use of it for host-to-guest
notifications via diagnose 500.

Signed-off-by: Cornelia Huck <>

5b23fd03 06/20/2013 05:32 pm Paolo Bonzini

Revert "s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62"

This reverts commit 311f83ca08c011b048c063c2fd3038a8957970bc.

Signed-off-by: Paolo Bonzini <>

48475e14 06/12/2013 12:19 pm Alexey Kardashevskiy

KVM: S390: Add dummy kvm_arch_init_irq_routing()

The common KVM code insists on calling kvm_arch_init_irq_routing()
as soon as it sees kernel header support for it (regardless of whether
QEMU supports it). Provide a dummy function to satisfy this.

Signed-off-by: Alexey Kardashevskiy <>...

6681fca3 06/01/2013 01:25 pm Stefan Weil

Remove unnecessary break statements

Fix these warnings from cppcheck:

hw/display/cirrus_vga.c:2603:
hw/sd/sd.c:348:
hw/timer/exynos4210_mct.c:1033:
target-arm/translate.c:9886:
target-s390x/mem_helper.c:518:
target-unicore32/translate.c:1936:
style: Consecutive return, break, continue, goto or throw statements are unnecessary....

311f83ca 05/24/2013 07:43 pm Paolo Bonzini

s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62

With the next patch, the memory API will complain if the
TARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to an
overflow. s390x can handle up to 64 bit of physical address
space from its page tables, but we never use that much. Just...

6eebf958 05/14/2013 04:53 pm Paolo Bonzini

osdep, kvm: rename low-level RAM allocation functions

This is preparatory to the introduction of a separate freeing API.

Reported-by: Amos Kong <>
Signed-off-by: Paolo Bonzini <>
Reviewed-by: Amos Kong <>...

805a2505 05/01/2013 07:55 pm Stefan Weil

Trivial grammar and spelling fixes

similiar -> similar
recieve -> receive
transfered -> transferred
preperation -> preparation

Most changes are in comments, one modifies a parameter name in a function
prototype.

The spelling fixes were made using codespell....

08eb8c85 04/30/2013 06:30 pm Christian Borntraeger

Wire up disabled wait a panicked event on s390

On s390 the disabled wait state indicates a state of attention.
For example Linux uses that state after a panic. Lets
put the system into panicked state.

An alternative implementation would be to state
disabled-wait <address> instead of pause in the action field....

3474b679 04/26/2013 09:18 pm Jason J. Herne

Utilize selective runtime reg sync for hot code paths

Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and
handle_hypercall() since they only need registers from the partial set and they
are called quite frequently.

Signed-off-by: Jason J. Herne <>...

420840e5 04/26/2013 09:18 pm Jason J. Herne

Allow selective runtime register synchronization

We want to avoid expensive register synchronization IOCTL's on the hot path so
a new kvm_s390_get_registers_partial() is introduced as a compliment to
kvm_arch_get_registers(). The new function is called on the hot path, and...

d49b8e0b 04/26/2013 12:58 pm Gabriel Kerneis

s390x: use CONFIG_INT128 to detect __uint128_t

Target s390x uses ad-hoc macro magic to guess if the compiler
supports the GCC extension __uint128_t. This patch uses the
the dedicated macro CONFIG_INT128 defined by configure instead.

This fixes compilation with the CIL source code analyzer, which...

e03ba136 04/12/2013 03:33 pm Peter Maydell

Typo, spelling and grammatical fixes

Minor fixes to documentation and code comments.

Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

5b90a866 04/05/2013 03:54 pm Richard Henderson

target-s390: Fix SRNMT

Fallthough into abort = oops.

Cc:
Cc: Alexander Graf <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Stefan Hajnoczi <>

085d8134 03/22/2013 02:25 pm Peter Maydell

Fix typos and misspellings

Fix various typos and misspellings. The bulk of these were found with
codespell.

Signed-off-by: Peter Maydell <>
Reviewed-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

225dc991 03/17/2013 10:01 pm Cornelia Huck

s390: Fix cpu refactoring fallout.

Commit 259186a7 "cpu: Move halted and interrupt_request fields to CPUState"
seems to have missed one instance in target-s390x/kvm.c:

/home/cohuck/git/qemu/target-s390x/kvm.c: In function ‘kvm_arch_process_async_events’:...

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

Signed-off-by: Andreas Färber <>

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

Signed-off-by: Andreas Färber <>

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

1c9d2a1d 03/08/2013 10:17 pm Christian Borntraeger

s390: simplify kvm cpu init

There is no special code right now and the reset ioctl is done later
on in the the reset handler anyway. Lets simplify the cpu init.

Signed-off-by: Christian Borntraeger <>
Signed-off-by: Alexander Graf <>

38dd7cc7 03/08/2013 10:17 pm Christian Borntraeger

s390/css: Fix subchannel detection

We have to consider the m bit to find the real channel subsystem when
determining the last subchannel.

If we fail to take this into account, removal of a subchannel in
the middle of a big list of devices will stop device detection after...

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

Signed-off-by: Peter Maydell <>...

fadf9825 03/03/2013 04:28 pm Andreas Färber

cpu: Introduce ENV_OFFSET macros

Introduce ENV_OFFSET macros which can be used in non-target-specific
code that needs to generate TCG instructions which reference CPUState
fields given the cpu_env register that TCG targets set up with a
pointer to the CPUArchState struct....

dc46d1c6 02/23/2013 07:25 pm Richard Henderson

target-s390x: Use mulu2 for mlgr insn

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

0dac8459 02/16/2013 03:51 pm Andreas Färber

target-s390x: Drop unused cpu_s390x_close() prototype

It was never implemented.

Signed-off-by: Andreas Färber <>

2b7ac767 02/16/2013 03:50 pm Andreas Färber

target-s390x: Move TCG initialization to S390CPU initfn

Ensures that a QOM-created S390CPU is usable.

Acked-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

1f136632 02/16/2013 03:50 pm Andreas Färber

target-s390x: Introduce QOM realizefn for S390CPU

Introduce realizefn and set realized = true in cpu_s390x_init().

Defer CPU reset from initfn to realizefn.

Acked-by: Richard Henderson <>
[AF: Invoke parent's realizefn]
Signed-off-by: Andreas Färber <>

bd9a8d85 02/13/2013 07:56 pm Cornelia Huck

s390: Keep I/O interrupts enabled for all iscs.

do_io_interrupt() would stop scanning further iscs if it found
an I/O interrupt it could inject. This might cause the pending
interrupt indication for I/O interrupts to be reset although there
might be queued I/O interrupts for subsequent iscs....

91b0a8f3 02/13/2013 07:56 pm Cornelia Huck

s390: Fix handling of iscs.

There are two ways to express an interruption subclass:
- As a bitmask, as used in cr6.
- As a number, as used in the I/O interruption word.

Unfortunately, we have treated to I/O interruption word as if it
contained the bitmask as well, which went unnoticed so far as...

0123c486 02/04/2013 11:24 pm Anthony Liguori

s390x: silence warning from GCC on uninitialized values

As best I can tell, this is a false positive.

[aliguori@ccnode4 qemu-s390]$ make
CC s390x-softmmu/target-s390x/helper.o
/home/aliguori/git/qemu/target-s390x/helper.c: In function ‘do_interrupt’:...
b22dd124 02/04/2013 11:24 pm Stefan Weil

target-s390x: Fix wrong comparison in interrupt handling

gcc with -Wextra complains about an ordered pointer comparison:

target-s390x/helper.c:660:27: warning:
ordered comparison of pointer with integer zero [-Wextra]

Obviously the index was missing in the code....

e205842b 02/01/2013 05:06 pm Anthony Liguori

Merge remote-tracking branch 'agraf/s390-for-upstream' into staging

  1. By Andreas Färber
  2. Via Alexander Graf
    • agraf/s390-for-upstream:
      target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()
      target-s390x: Clean up cpu_inject_*() signatures
      target-s390x: Fix debug output...
a6f921b0 02/01/2013 03:02 am Andreas Färber

target-s390x: Fix debug output (continued)

Since its introduction in d5a439645a5a70fed5431318c3bce9dc2caa950f
(s390x: helper functions for system emulation) the variable name was
raddr. Fix this.

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

07cc7d12 02/01/2013 03:02 am Andreas Färber

target-s390x: Fix debug output

Commit 71e470886fb6092504503a5fe41092ace71c096c (target-s390x: fix
style) renamed the cpu_s390x_handle_mmu_fault() argument from _vaddr to
orig_vaddr. Update the debug output code.

Signed-off-by: Andreas Färber <>...

f9466733 02/01/2013 03:02 am Andreas Färber

target-s390x: Clean up cpu_inject_*() signatures

Despite cautioning that S390CPU is needed for upcoming CPUState
refactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390:
I/O interrupt and machine check injection.) added functions
cpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument,...

49e15878 02/01/2013 03:02 am Andreas Färber

target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()

This prepares for moving the halted field to CPUState.
Most call sites can already supply S390CPU, for some env becomes unused.

Signed-off-by: Andreas Färber <>
Acked-by: Cornelia Huck <>...

c7396bbb 02/01/2013 02:35 am Andreas Färber

target-s390x: Mark as unmigratable

CPU_SAVE_VERSION was undefined, so "cpu_common" VMState and
cpu_{save,load}() were not registered. They were no-ops.
Therefore there is no backwards compatibility to keep, so we can mark
S390CPU as unmigratable at device level....

50c8d9bf 01/29/2013 10:50 pm Cornelia Huck

s390: Use s390_cpu_physical_memory_map for tpi.

Map the I/O interruption code before calling into css.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

4782a23b 01/29/2013 10:50 pm Cornelia Huck

s390: Lowcore mapping helper.

Create a lowcore mapping helper that includes a check for sufficient
length.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

38322ed6 01/29/2013 10:50 pm Cornelia Huck

s390: Add mapping helper functions.

Add s390_cpu_physical_memory_{map,unmap} with special handling
for the lowcore.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

db1c8f53 01/29/2013 10:50 pm Cornelia Huck

s390: Channel I/O basic definitions.

Basic channel I/O structures and helper function.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

5d69c547 01/29/2013 10:50 pm Cornelia Huck

s390: I/O interrupt and machine check injection.

I/O interrupts are queued per isc. Only crw pending machine checks
are supported.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

7b18aad5 01/29/2013 10:50 pm Cornelia Huck

s390: Add channel I/O instructions.

Provide handlers for (most) channel I/O instructions.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

df1fe5bb 01/29/2013 10:50 pm Cornelia Huck

s390: Virtual channel subsystem support.

Provide a mechanism for qemu to provide fully virtual subchannels to
the guest.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

09b99878 01/29/2013 10:50 pm Cornelia Huck

s390: Wire up channel I/O in kvm.

Trigger the code for our virtual css in case of instruction
intercepts for I/O instructions.

Handle the tsch exit for the subchannel-related part of tsch.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

b164e48e 01/27/2013 03:34 pm Eduardo Habkost

kvm: Create kvm_arch_vcpu_id() function

This will allow each architecture to define how the VCPU ID is set on
the KVM_CREATE_VCPU ioctl call.

Signed-off-by: Eduardo Habkost <>
Acked-by: Gleb Natapov <>
Signed-off-by: Andreas Färber <>

ccb084d3 01/18/2013 08:07 pm Christian Borntraeger

s390: new contributions GPLv2 or later

IBMs s390 contributions were meant to to be gplv2 or later (since
we were contributing to qemu). Several of the s390 specific files
link to gpl code anyway, so lets clarify the licence statement for
new contributions for those files that we have touched multiple...

904e5fd5 01/18/2013 08:07 pm Viktor Mihajlovski

S390: Enable -cpu help and QMP query-cpu-definitions

This enables qemu -cpu help to return a list of supported CPU models
on s390 and also to query for cpu definitions in the monitor.
Initially only cpu model = host is returned. This needs to be reworked...

a158986d 01/18/2013 08:07 pm Stefan Weil

s390x: Remove inline function ebcdic_put and related data from cpu.h

The function is only used in misc_helper.c, so move it to that file.

This reduces the size of debug executables (compiled without optimization)
because they get unused code and data for each compilation which includes...

70bada03 01/18/2013 08:07 pm Jens Freimann

s390: Add CPU reset handler

Add a CPU reset handler to have all CPUs in a PoP compliant
state.

Signed-off-by: Jens Freimann <>
[agraf: move hw/hw.h into existing ifdef]
Signed-off-by: Alexander Graf <>

419831d7 01/18/2013 08:07 pm Alexander Graf

s390x: fix indentation

In one of the last commits we accidently got 3-space indentation into
the tree. Fix it up so it's 4 spaces wide.

Reported-by: Andreas Faerber <>
Signed-off-by: Alexander Graf <>

d5627ce8 01/18/2013 08:07 pm Andreas Färber

target-s390x: Unregister reset callback on finalization

Since commit "s390: Add CPU reset handler" the CPU's instance_init
registers a reset callback. Unregister that on instance_finalize.

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

28e942f8 01/18/2013 08:07 pm Cornelia Huck

s390: Add a hypercall registration interface.

Allow virtio machines to register for different diag500 function
codes and convert s390-virtio to use it.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

c95ec459 01/05/2013 10:18 pm Richard Henderson

target-s390: Optimize ADDC/SUBB

Giving the proper mask to disas_jcc allows us to generate an inline
comparison generating the carry/borrow with setcond.

In the very worst case, when we must use the external helper to compute
a value for CC, we generate (cc > 1) instead of (cc >> 1), which is only...

bacf43c6 01/05/2013 10:18 pm Richard Henderson

target-s390: Optimize get_address

Don't load the displacement into a register first, add it second
so that tcg_gen_addi_i64 can eliminate zeros. Don't mask the
displacement first so that we don't turn small negative numbers
into large positive numbers.
...

b7886de3 01/05/2013 10:18 pm Richard Henderson

target-s390: Perform COMPARE AND SWAP inline

Still no proper solution for CONFIG_USER_ONLY, but the system
version is significantly better.

Signed-off-by: Richard Henderson <>

d918a65c 01/05/2013 10:18 pm Richard Henderson

target-s390: Use TCG_CALL_NO_WG for memory helpers

Those that do not read or write tcg registers, but can
raise exceptions via memory faults.

Signed-off-by: Richard Henderson <>

c482ea94 01/05/2013 10:18 pm Richard Henderson

target-s390: Use TCG_CALL_NO_WG for floating-point helpers

None of them read or write tcg registers, but most can
raise fp exceptions.

Signed-off-by: Richard Henderson <>

c20fec40 01/05/2013 10:18 pm Richard Henderson

target-s390: Use TCG_CALL_NO_WG for integer helpers

The division routines do not read or write tcg registers,
but can raise fixed-point divide exceptions.

Signed-off-by: Richard Henderson <>

893e1660 01/05/2013 10:18 pm Richard Henderson

target-s390: Use TCG_CALL_NO_WG for misc helpers

Signed-off-by: Richard Henderson <>

26cc0a3f 01/05/2013 10:18 pm Richard Henderson

target-s390: Use noreturn for exception and load_psw

Both always exit the cpu loop.

Signed-off-by: Richard Henderson <>

99b4f24b 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement POPCNT

Signed-off-by: Richard Henderson <>

2db014b5 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement CPSDR

Signed-off-by: Richard Henderson <>

49f7ee80 01/05/2013 10:18 pm Richard Henderson

target-s390: Check insn operand specifications

Removes all the fixmes for even register numbers, etc.

Signed-off-by: Richard Henderson <>

1d1f6301 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement LCDFR

Signed-off-by: Richard Henderson <>

d2d9feac 01/05/2013 10:18 pm Richard Henderson

target-s390: Use uint64_to_float128

Signed-off-by: Richard Henderson <>

a12000b9 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement SET ROUNDING MODE

Signed-off-by: Richard Henderson <>

411edc22 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement LOAD/SET FP AND SIGNAL

Signed-off-by: Richard Henderson <>

90b4f8ad 01/05/2013 10:18 pm Richard Henderson

target-s390: Fix cpu_clone_regs

R2 is the syscall return register, not R0.

Signed-off-by: Richard Henderson <>

d074ac6d 01/05/2013 10:18 pm Richard Henderson

target-s390: Optimize XC

Notice XC with same address and convert that to store of zero.

Signed-off-by: Richard Henderson <>

f24c49c2 01/05/2013 10:18 pm Richard Henderson

target-s390: Optmize emitting discards

While they aren't expensive, they aren't free to process. When we
know that the three cc helper variables are dead, don't kill them.

Signed-off-by: Richard Henderson <>

de379661 01/05/2013 10:18 pm Richard Henderson

target-s390: Tidy comparisons

After full conversion, we can audit the uses of LTGT cc ops
and see that none of the instructions can ever set CC=3.
Thus we can extend the table to treat that bit as ignored.

This fixes a regression wrt the pre-conversion translation...

a359b770 01/05/2013 10:18 pm Richard Henderson

target-s390: Optimize ADDU/SUBU CC testing

We can easily generate some masks for logical add/subtract inline.

Signed-off-by: Richard Henderson <>

403e217f 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement COMPARE RELATIVE LONG

Signed-off-by: Richard Henderson <>

1c268751 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement COMPARE AND TRAP

Signed-off-by: Richard Henderson <>

632086da 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement LOAD ON CONDITION

Signed-off-by: Richard Henderson <>

b92fa334 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement STORE ON CONDITION

Signed-off-by: Richard Henderson <>

6ac1b45f 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement CONVERT TO LOGICAL

Signed-off-by: Richard Henderson <>

2112bf1b 01/05/2013 10:18 pm Richard Henderson

target-s390: Implement CONVERT FROM LOGICAL

Signed-off-by: Richard Henderson <>