unicorn/qemu/include/exec
Richard Henderson 533a3f6a6c
tcg: Fix helper function vs host abi for float16
Depending on the host abi, float16, aka uint16_t, values are
passed and returned either zero-extended in the host register
or with garbage at the top of the host register.

The tcg code generator has so far been assuming garbage, as that
matches the x86 abi, but this is incorrect for other host abis.
Further, target/arm has so far been assuming zero-extended results,
so that it may store the 16-bit value into a 32-bit slot with the
high 16-bits already clear.

Rectify both problems by mapping "f16" in the helper definition
to uint32_t instead of (a typedef for) uint16_t. This forces
the host compiler to assume garbage in the upper 16 bits on input
and to zero-extend the result on output.

Backports commit 6c2be133a7478e443c99757b833d0f265c48e0a6 from qemu
2018-06-02 10:10:12 -04:00
..
address-spaces.h Clean up header guards that don't match their file name 2018-02-25 04:18:42 -05:00
cpu-all.h target-*: Don't redefine cpu_exec() 2018-03-20 07:02:47 -04:00
cpu-common.h cpu: Introduce a wrapper for tlb_flush() that can be used in common code 2018-03-03 21:24:55 -05:00
cpu-defs.h tcg: add CONFIG_TCG guards in headers 2018-03-03 21:37:52 -05:00
cpu_ldst.h cpu_ldst.h: use correct guest address parameter 2018-03-01 08:56:37 -05:00
cpu_ldst_template.h softmmu: add helper function to pass through retaddr 2018-02-17 15:23:38 -05:00
cputlb.h exec: Drop unnecessary code for unicorn 2018-03-12 10:11:46 -04:00
exec-all.h icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 20:05:40 -04:00
gen-icount.h tcg: Dynamically allocate TCGOps 2018-03-05 16:34:40 -05:00
helper-gen.h target/arm: Implement SVE Integer Multiply-Add Group 2018-05-20 04:35:36 -04:00
helper-head.h tcg: Fix helper function vs host abi for float16 2018-06-02 10:10:12 -04:00
helper-proto.h tcg: Allow 6 arguments to TCG helpers 2018-03-17 18:29:04 -04:00
helper-tcg.h tcg: Allow 6 arguments to TCG helpers 2018-03-17 18:29:04 -04:00
hwaddr.h qemu-common: push cpu.h inclusion out of qemu-common.h 2018-02-24 01:50:56 -05:00
ioport.h hw: remove pio_addr_t 2018-02-24 02:43:16 -05:00
memattrs.h memory.h: Move MemTxResult type to memattrs.h 2018-03-04 13:10:47 -05:00
memory-internal.h memory: Rename mem_begin/mem_commit/mem_add helpers 2018-03-11 21:36:50 -04:00
memory.h memory: Share special empty FlatView 2018-03-11 22:34:28 -04:00
ram_addr.h exec: Drop unnecessary code for unicorn 2018-03-12 10:11:46 -04:00
ramlist.h memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
semihost.h exec: Add semihosting stubs 2018-02-17 15:23:33 -05:00
tb-context.h tcg: allocate TB structs before the corresponding translated code 2018-03-03 17:05:49 -05:00
tb-hash-xx.h Clean up ill-advised or unusual header guards 2018-02-25 04:22:46 -05:00
tb-hash.h tb-hash: improve tb_jmp_cache hash function in user mode 2018-03-03 14:11:29 -05:00
tb-lookup.h exec-all: bring tb->invalid into tb->cflags 2018-03-05 02:46:21 -05:00
translator.h translator: merge max_insns into DisasContextBase 2018-05-11 13:59:17 -04:00