14b155ddc4
tcg-aarch64: Support andc, orc, eqv, not, neg
...
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:52 -07:00
e029f29385
tcg-aarch64: Handle constant operands to and, or, xor
...
Handle a simplified set of logical immediates for the moment.
The way gcc and binutils do it, with 52k worth of tables, and
a binary search depth of log2(5334) = 13, seems slow for the
most common cases.
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:47 -07:00
90f1cd9138
tcg-aarch64: Handle constant operands to add, sub, and compare
...
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:44 -07:00
7d11fc7c2b
tcg-aarch64: Implement mov with tcg_out_insn
...
Avoid the magic numbers in the current implementation.
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:41 -07:00
096c46c0ff
tcg-aarch64: Introduce tcg_out_insn_3401
...
This merges the implementation of tcg_out_addi and tcg_out_subi.
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:38 -07:00
df9351e372
tcg-aarch64: Convert shift insns to tcg_out_insn
...
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:35 -07:00
50573c66eb
tcg-aarch64: Introduce tcg_out_insn
...
Converting the add/sub (3.5.2) and logical shifted (3.5.10) instruction
groups to the new scheme.
Signed-off-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Tested-by: Claudio Fontana <claudio.fontana@huawei.com >
2014-03-14 10:59:13 -07:00
f8e2484389
tcg-aarch64: Remove nop from qemu_st slow path
...
Commit 023261ef85
failed to remove a
nop that's no longer required.
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:25 -08:00
523fdc08cc
tcg-aarch64: Simplify tcg_out_ldst_9 encoding
...
At first glance the code appears to be using 1's compliment encoding,
a-la AArch32. Except that the constant is "off", creating a complicated
split field 2's compliment encoding.
Much clearer to just use a normal mask and shift.
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:25 -08:00
017a86f7ad
tcg-aarch64: Use intptr_t apropriately
...
As opposed to tcg_target_long.
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:25 -08:00
2e796c7621
tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmp
...
It was unused. Let's not overcomplicate things before we need them.
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:25 -08:00
8d8db193f2
tcg-aarch64: Hoist common argument loads in tcg_out_op
...
This reduces the code size of the function significantly.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:16 -08:00
a51a6b6ad5
tcg-aarch64: Don't handle mov/movi in tcg_out_op
...
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:15 -08:00
f029341494
tcg-aarch64: Set ext based on TCG_OPF_64BIT
...
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:09 -08:00
7763ffa017
tcg-aarch64: Change all ext variables to TCGType
...
We assert that the values for _I32 and _I64 are 0 and 1 respectively.
This will make a couple of functions declared by tcg.c cleaner.
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:09 -08:00
3353d0dcc3
tcg-aarch64: Remove redundant CPU_TLB_ENTRY_BITS check
...
Removed from other targets in 56bbc2f967
.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2014-03-08 21:23:02 -08:00
9ecefc84dd
tcg: Add tcg-be-ldst.h
...
Move TCGLabelQemuLdst and related stuff out of tcg.h.
Signed-off-by: Richard Henderson <rth@twiddle.net >
2013-10-10 11:44:26 -07:00
023261ef85
tcg-aarch64: Update to helper_ret_*_mmu routines
...
A minimal update to use the new helpers with the return address argument.
Tested-by: Claudio Fontana <claudio.fontana@linaro.org >
Reviewed-by: Claudio Fontana <claudio.fontana@linaro.org >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2013-10-10 11:44:25 -07:00
e58eb53413
exec: Split softmmu_defs.h
...
The _cmmu helpers can be moved to exec-all.h. The helpers that are
used from TCG will shortly need access to tcg_target_long so move
their declarations into tcg.h.
This requires minor include adjustments to all TCG backends.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2013-09-02 09:08:30 -07:00
a05b5b9be0
tcg: Change tcg_out_ld/st offset to intptr_t
...
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2013-09-02 09:08:30 -07:00
2ba7fae29e
tcg: Change relocation offsets to intptr_t
...
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net >
Signed-off-by: Richard Henderson <rth@twiddle.net >
2013-09-02 09:08:29 -07:00
c6d8ed24b4
tcg/aarch64: Implement tlb lookup fast path
...
Supports CONFIG_QEMU_LDST_OPTIMIZATION
Signed-off-by: Jani Kokkonen <jani.kokkonen@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com >
2013-07-15 13:13:46 +02:00
b1f6dc0d2a
tcg/aarch64: implement ldst 12bit scaled uimm offset
...
implement the 12bit scaled unsigned immediate offset
variant of LDR/STR. This improves code size by avoiding
the movi + ldst_r for naturally aligned offsets in range.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
2013-07-03 14:43:11 +02:00
6a91c7c978
tcg/aarch64: implement user mode qemu ld/st
...
also put aarch64 in the list of archs that do not need an ldscript.
Signed-off-by: Jani Kokkoken <jani.kokkonen@huawei.com >
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 51AF40EE.1000104@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:23 +01:00
31f1275b90
tcg/aarch64: implement sign/zero extend operations
...
implement the optional sign/zero extend operations with the dedicated
aarch64 instructions.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Message-id: 51AC9A58.40502@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:23 +01:00
9c4a059df3
tcg/aarch64: implement byte swap operations
...
implement the optional byte swap operations with the dedicated
aarch64 instructions.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Message-id: 51AC9A33.9050003@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:23 +01:00
7deea126b2
tcg/aarch64: implement AND/TEST immediate pattern
...
add functions to AND/TEST registers with immediate patterns.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Message-id: 51AC9A0C.3090303@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:22 +01:00
36fac14a64
tcg/aarch64: improve arith shifted regs operations
...
for arith operations, add SUBS, ANDS, ADDS and add a shift parameter
so that all arith instructions can make use of shifted registers.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Message-id: 51AC998B.7070506@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:22 +01:00
4a136e0a6b
tcg/aarch64: implement new TCG target for aarch64
...
add preliminary support for TCG target aarch64.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com >
Reviewed-by: Richard Henderson <rth@twiddle.net >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 51A5C596.3090108@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2013-06-12 16:20:22 +01:00