Statistics
| Branch: | Revision:

root / target-arm / translate-a64.c @ 626187d8

History | View | Annotate | Download (274.6 kB)

# Date Author Comment
626187d8 02/20/2014 12:35 pm Peter Maydell

target-arm: Log bad system register accesses with LOG_UNIMP

Log guest attempts to access unimplemented system registers via
the LOG_UNIMP reporting mechanism (for both the 32 bit and 64 bit
instruction sets). This is particularly useful for debugging
problems where the guest is trying to use a system register that...

bc242f9b 02/20/2014 12:35 pm Alex Bennée

target-arm: A64: Implement floating point pairwise insns

Add support for the floating-point pairwise operations
FADDP, FMAXP, FMAXNMP, FMINP and FMINNMP. To do this we use the
code which was previously handling only integer pairwise operations,
and push the integer-specific decode and handling of unallocated...

057d5f62 02/20/2014 12:35 pm Peter Maydell

target-arm: A64: Implement remaining 3-same instructions

Implement the remaining instructions in the SIMD 3-reg-same
and scalar-3-reg-same groups: FMULX, FRECPS, FRSQRTS, FACGE,
FACGT, FMLA and FMLS.

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

c44ad1fd 02/20/2014 12:35 pm Peter Maydell

target-arm: A64: Implement long vector x indexed insns

Implement the 'long' operations in the vector x indexed
element category.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

9f82e0ff 02/20/2014 12:35 pm Peter Maydell

target-arm: A64: Implement SIMD scalar indexed instructions

Implement the SIMD scalar indexed instructions. The encoding
here is nearly identical to the vector indexed grouping, so
we combine the two.

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

b033cd3d 02/20/2014 12:35 pm Peter Maydell

target-arm: A64: Implement scalar three different instructions

Implement the scalar three different instruction group:
it only has three instructions in it.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

8908f4d1 02/20/2014 12:35 pm Alex Bennée

target-arm: A64: Implement SIMD FP compare and set insns

This adds all forms of the SIMD floating point and set instructions:

FCM(GT|GE|EQ|LE|LT)

Most of the heavy lifting is done by either the existing neon helpers or
some new helpers for the 64bit double cases. Most of the code paths are...

f5e51e7f 02/20/2014 12:35 pm Peter Maydell

target-arm: A64: Implement plain vector SIMD indexed element insns

Implement all the SIMD vector x indexed element instructions
in the subcategory which are not 'long' ops.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

999b53ec 02/08/2014 04:50 pm Claudio Fontana

disas: Implement disassembly output for A64

Use libvixl to implement disassembly output in debug
logs for A64, for use with both AArch64 hosts and targets.

Signed-off-by: Claudio Fontana <>
[PMM: * added support for target disassembly...

94b6c911 02/08/2014 04:47 pm Peter Maydell

target-arm: A64: Implement 2-register misc compares, ABS, NEG

Implement the simple 2-register-misc operations we can share
with the scalar-two-register-misc code. (SUQADD, USQADD, SQABS,
SQNEG also fall into this category, but aren't implemented in
the scalar-2-register case yet either.)...

86cbc418 02/08/2014 04:47 pm Peter Maydell

target-arm: A64: Implement 2-reg-misc CNT, NOT and RBIT

Implement the 2-reg-misc CNT, NOT and RBIT instructions.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

d980fd59 02/08/2014 04:47 pm Peter Maydell

target-arm: A64: Add narrowing 2-reg-misc instructions

Add the narrowing integer instructions in the 2-reg-misc class.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

39d82118 02/08/2014 04:47 pm Alex Bennée

target-arm: A64: Add 2-reg-misc REV* instructions

Add the byte-reverse operations REV64, REV32 and REV16 from the
two-reg-misc group.

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

f93d0138 02/08/2014 04:47 pm Peter Maydell

target-arm: A64: Add FNEG and FABS to the SIMD 2-reg-misc group

Add the SIMD FNEG and FABS instructions in the SIMD 2-reg-misc group.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

3720a7ea 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Implement scalar pairwise ops

Implement the instructions in the scalar pairwise group (C3.6.8).

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

c0b2b5fa 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Implement remaining integer scalar-3-same insns

Implement the remaining integer instructions in the scalar-three-reg-same
group: SQADD, UQADD, SQSUB, UQSUB, SQSHL, UQSHL, SQRSHL, UQRSHL,
SQDMULH, SQRDMULH.

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

effa8e06 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Add SIMD simple 64 bit insns from scalar 2-reg misc

Implement the simple 64 bit integer operations from the SIMD
scalar 2-register misc group (C3.6.12): the comparisons against
zero, plus ABS and NEG.

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

45aecc6d 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Add skeleton decode for SIMD 2-reg misc group

Add a skeleton decode for the SIMD 2-reg misc group.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

6d9571f7 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Implement SIMD 3-reg-same shift and saturate insns

Implement the SIMD 3-reg-same instructions SQADD, UQADD,
SQSUB, UQSUB, SSHL, USHL, SQSHl, UQSHL, SRSHL, URSHL,
SQRSHL, UQRSHL; these are all simple calls to existing
Neon helpers. We also enable SSHL, USHL, SRSHL and URSHL...

8b12a0cf 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Implement remaining non-pairwise int SIMD 3-reg-same insns

Implement the SIMD 3-reg-same instructions where the size == 3 case
is reserved: SHADD, UHADD, SRHADD, URHADD, SHSUB, UHSUB, SMAX,
UMAX, SMIN, UMIN, SABD, UABD, SABA, UABA, MLA, MLS, MUL, PMUL,...

0173a005 02/08/2014 04:46 pm Peter Maydell

target-arm: A64: Implement pairwise integer ops from 3-reg-same SIMD

Implement the pairwise integer operations in the 3-reg-same SIMD group:
ADDP, SMAXP, SMINP, UMAXP and UMINP.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

e1cea114 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add top level decode for SIMD 3-same group

Add top level decode for the A64 SIMD three regs same group
(C3.6.16), splitting it into the pairwise, logical, float and
integer subgroups.

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

956d272e 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add logic ops from SIMD 3 same group

Add support for the logical operations (ORR, AND, BIC, ORN, EOR, BSL,
BIT and BIF) from the SIMD 3 register same group (C3.6.16).

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>...

1f8a73af 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add integer ops from SIMD 3-same group

Add some of the integer operations in the SIMD 3-same group:
specifically, the comparisons, addition and subtraction.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

845ea09a 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add simple SIMD 3-same floating point ops

Implement a simple subset of the SIMD 3-same floating point
operations. This includes a common helper function used for both
scalar and vector ops; FABD is the only currently implemented
shared op....

4d1cef84 01/31/2014 04:47 pm Alex Bennée

target-arm: A64: Add SIMD shift by immediate

This implements a subset of the AdvSIMD shift operations (namely all the
none saturating or narrowing ones). The actual shift generation code
itself is common for both the scalar and vector cases but wrapped with...

a08582f4 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD three-different multiply accumulate insns

Add support for the multiply-accumulate instructions from the
SIMD three-different instructions group (C3.6.15): * skeleton decode of unallocated encodings and split of
the group into its three sub-parts...

0ae39320 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD three-different ABDL instructions

Implement the absolute-difference instructions in the SIMD
three-different group: SABAL, SABAL2, UABAL, UABAL2, SABDL,
SABDL2, UABDL, UABDL2.

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

b305dba6 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD scalar 3 same add, sub and compare ops

Implement the add, sub and compare ops from the SIMD "scalar three same"
group.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

9972da66 01/31/2014 04:47 pm Will Newton

target-arm: Move arm_rmode_to_sf to a shared location.

This function will be needed for AArch32 ARMv8 support, so move it to
helper.c where it can be used by both targets. Also moves the code out
of line, but as it is quite a large function I don't believe this...

f3f8c4f4 01/31/2014 04:47 pm Alex Bennée

target-arm: A64: Add SIMD modified immediate group

This patch adds support for the AdvSIMD modified immediate group
(C3.6.6) with all its suboperations (movi, orr, fmov, mvni, bic).

Signed-off-by: Alexander Graf <>
[AJB: new decode struct, minor bug fixes, optimisation]...

360a6f2d 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD scalar copy instructions

Add support for the SIMD scalar copy instruction group (C3.6.7),
which consists of the single instruction DUP (element, scalar).

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

7c51048f 01/31/2014 04:47 pm Michael Matz

target-arm: A64: Add SIMD TBL/TBLX

Add support for the SIMD TBL/TBLX instructions (group C3.6.2).

Signed-off-by: Michael Matz <>
[PMM: rewritten to do more of the decode in translate-a64.c,
and to do only one 64 bit pass at a time in the helper]...

5fa5469c 01/31/2014 04:47 pm Michael Matz

target-arm: A64: Add SIMD ZIP/UZP/TRN

Add support for the SIMD ZIP/UZIP/TRN instruction group
(C3.6.3).

Signed-off-by: Michael Matz <>
[PMM: use new do_vec_get/set etc functions and generally update to new
codebase standards; refactor to pull per-element loop outside switch]...

4a0ff1ce 01/31/2014 04:47 pm Michael Matz

target-arm: A64: Add SIMD across-lanes instructions

Add support for the SIMD "across lanes" instruction group (C3.6.4).

Signed-off-by: Michael Matz <>
[PMM: Updated to current codebase, added fp min/max ops,
added unallocated encoding checks]...

67bb9389 01/31/2014 04:47 pm Alex Bennée

target-arm: A64: Add SIMD copy operations

This adds support for the all the AdvSIMD vector copy operations
(ARM ARM 3.6.5).

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

72430bf5 01/31/2014 04:47 pm Alex Bennée

target-arm: A64: Add SIMD ld/st multiple

This adds support support for the SIMD load/store
multiple category of instructions.

This also brings in a couple of helper functions for manipulating
sections of the SIMD registers:

  • do_vec_get - fetch value from a slice of a vector register...
df54e47d 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD ld/st single

Implement the SIMD ld/st single structure instructions.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

384b26fb 01/31/2014 04:47 pm Alex Bennée

target-arm: A64: Add decode skeleton for SIMD data processing insns

Add decode skeleton and function placeholders for all the SIMD data
processing instructions. Due to the complexity of this part of the
table the normal extract and switch approach gets very messy very...

5c73747f 01/31/2014 04:47 pm Peter Maydell

target-arm: A64: Add SIMD EXT

Add support for the SIMD EXT instruction (the only one in its
group, C3.6.1).

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

52a1f6a3 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add floating-point<->fixed-point instructions

This patch adds emulation for the instruction group labeled
"Floating-point <-> fixed-point conversions" in the ARM ARM.

Namely this includes the instructions SCVTF, UCVTF, FCVTZS, FCVTZU
(scalar, fixed-point)....

c436d406 01/08/2014 09:07 pm Will Newton

target-arm: A64: Add floating-point<->integer conversion instructions

Add support for the AArch64 floating-point <-> integer conversion
instructions to disas_fpintconv. In the process we can rearrange
and simplify the detection of unallocated encodings a little....

d9b0848d 01/08/2014 09:07 pm Peter Maydell

target-arm: A64: Add 1-source 32-to-32 and 64-to-64 FP instructions

This patch adds support for those instructions in the "Floating-point
data-processing (1 source)" group which are simple 32-bit-to-32-bit
or 64-bit-to-64-bit operations (ie everything except FCVT between...

8900aad2 01/08/2014 09:07 pm Peter Maydell

target-arm: A64: Add support for FCVT between half, single and double

Add support for FCVT between half, single and double precision.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

f6d8a314 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add support for dumping AArch64 VFP register state

When dumping the current CPU state, we can also get a request
to dump the FPU state along with the CPU's integer state.

Add support to dump the VFP state when that flag is set, so that
we can properly debug code that modifies floating point registers....

e2f90565 01/08/2014 09:07 pm Peter Maydell

target-arm: A64: Fix vector register access on bigendian hosts

The A64 128 bit vector registers are stored as a pair of
uint64_t values in the register array. This means that if
we're directly loading or storing a value of size less than
64 bits we must adjust the offset appropriately to account...

ec73d2e0 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add "Floating-point data-processing (2 source)" insns

This patch adds emulation for the "Floating-point data-processing (2 source)"
group of instructions.

Signed-off-by: Alexander Graf <>
[WN: Commit message tweak, merge single and double precision patches. Rebase...

6a30667f 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add "Floating-point data-processing (3 source)" insns

This patch adds emulation for the "Floating-point data-processing (3 source)"
group of instructions.

Signed-off-by: Alexander Graf <>
[WN: Commit message tweak, merged single and double precision patches....

6163f868 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add fmov (scalar, immediate) instruction

This patch adds emulation for the fmov instruction working on scalars
with an immediate payload.

Signed-off-by: Alexander Graf <>
[WN: Commit message tweak, rebase and use new infrastructure.]...

da7dafe7 01/08/2014 09:07 pm Claudio Fontana

target-arm: A64: Add support for floating point compare

Add decoding support for C3.6.22 Floating-point compare.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

513f1d76 01/08/2014 09:07 pm Claudio Fontana

target-arm: A64: Add support for floating point conditional compare

This adds decoding support for C3.6.23 FP Conditional Compare.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

5640ff62 01/08/2014 09:07 pm Claudio Fontana

target-arm: A64: Add support for floating point cond select

This adds decoding support for C3.6.24 FP conditional select.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

643dbb07 01/08/2014 09:07 pm Claudio Fontana

target-arm: A64: add support for add/sub with carry

This patch adds support for C3.5.3 Add/subtract (with carry):
instructions ADC, ADCS, SBC, SBCS.

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

750813cf 01/08/2014 09:07 pm Claudio Fontana

target-arm: A64: add support for conditional compare insns

this patch adds support for C3.5.4 - C3.5.5
Conditional compare (both immediate and register)

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

32b64e86 01/08/2014 09:07 pm Alexander Graf

target-arm: aarch64: add support for ld lit

Adds support for Load Register (literal), both normal
and SIMD/FP forms.

Signed-off-by: Alexander Graf <>
Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>...

fa2ef212 01/08/2014 09:07 pm Michael Matz

target-arm: A64: support for ld/st/cl exclusive

This implement exclusive loads/stores for aarch64 along the lines of
arm32 and ppc implementations. The exclusive load remembers the address
and loaded value. The exclusive store throws an an exception which uses...

b0d2b7d0 01/07/2014 09:17 pm Peter Maydell

target-arm: A64: Implement minimal set of EL0-visible sysregs

Implement an initial minimal set of EL0-visible system registers: * NZCV * FPCR * FPSR * CTR_EL0 * DCZID_EL0

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>...

60322b39 01/07/2014 09:17 pm Peter Maydell

target-arm: Remove ARMCPU/CPUARMState from cpregs APIs used by decoder

The cpregs APIs used by the decoder (get_arm_cp_reginfo() and
cp_access_ok()) currently take either a CPUARMState* or an ARMCPU*.
This is problematic for the A64 decoder, which doesn't pass the...

fea50522 01/07/2014 09:17 pm Peter Maydell

target-arm: A64: Implement MRS/MSR/SYS/SYSL

The AArch64 equivalent of the traditional AArch32
cp15 coprocessor registers is the set of instructions
MRS/MSR/SYS/SYSL, which cover between them both true
system registers and the "operations with side effects"...

ce5458e8 12/24/2013 01:27 am Peter Maydell

target-arm: A64: implement FMOV

Implement FMOV, ie non-converting moves between general purpose
registers and floating point registers. This is a subtype of
the floating point <-> integer instruction class.

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

52c8b9af 12/24/2013 01:27 am Alexander Graf

target-arm: A64: add support for 3 src data proc insns

This patch adds emulation for the "Data-processing (3 source)"
family of instructions, namely MADD, MSUB, SMADDL, SMSUBL, SMULH,
UMADDL, UMSUBL, UMULH.

Signed-off-by: Alexander Graf <>
Signed-off-by: Alex Bennée <>...

9618e809 12/24/2013 01:27 am Alexander Graf

target-arm: A64: implement SVC, BRK

Add decoding for the exception generating instructions, and implement
SVC (syscalls) and BRK (software breakpoint).

Signed-off-by: Alexander Graf <>
Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>...

faa0ba46 12/24/2013 01:27 am Peter Maydell

target-arm: A64: Add decoder skeleton for FP instructions

Add a top level decoder skeleton for FP instructions.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

229b7a05 12/24/2013 01:27 am Alex Bennée

target-arm: A64: add support for ld/st with reg offset

This adds support for the load/store forms using a register offset.

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

a5e94a9d 12/24/2013 01:27 am Alex Bennée

target-arm: A64: add support for ld/st with index

This adds support for the pre/post-index ld/st forms with immediate
offsets as well as the un-scaled immediate form (which are all
variations on the same 9-bit immediate instruction form).

Signed-off-by: Alex Bennée <>...

b0ff21b4 12/24/2013 01:27 am Alex Bennée

target-arm: A64: add support for add, addi, sub, subi

Implement the non-carry forms of addition and subtraction
(immediate, extended register and shifted register).
This includes the code to calculate NZCV if the instruction
calls for setting the flags.
...

ed6ec679 12/24/2013 01:27 am Alex Bennée

target-arm: A64: add support for move wide instructions

This patch adds emulation for the mov wide instructions
(MOVN, MOVZ, MOVK).

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

4a08d475 12/24/2013 01:27 am Peter Maydell

target-arm: A64: add support for ld/st pair

This patch support the basic load and store pair instructions and
includes the generic helper functions:

  • do_gpr_st()
  • do_fp_st()
  • do_gpr_ld()
  • do_fp_ld()
  • read_cpu_reg_sp()
  • gen_check_sp_alignment()...
d5612f10 12/24/2013 01:27 am Alex Bennée

target-arm: A64: add support for ld/st unsigned imm

This adds support for the forms of ld/st with a 12 bit
unsigned immediate offset.

Signed-off-by: Alex Bennée <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

e801de93 12/17/2013 10:12 pm Alexander Graf

target-arm: A64: add support for EXTR

This patch adds emulation support for the EXTR instruction.

Signed-off-by: Alexander Graf <>

[claudio: adapted for new decoder, removed a few temporaries,
fixed the 32bit bug, added checks for more...

8220e911 12/17/2013 10:12 pm Alexander Graf

target-arm: A64: add support for 2-src data processing and DIV

This patch adds support for decoding 2-src data processing insns,
and the first users, UDIV and SDIV.

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder adding the 2-src decoding level,...

6c1adc91 12/17/2013 10:12 pm Alexander Graf

target-arm: A64: add support for 2-src shift reg insns

This adds 2-src variable shift register instructions:
C5.6.115 LSLV, C5.6.118 LSRV, C5.6.17 ASRV, C5.6.154 RORV

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder, use enums for shift types]...

680ead21 12/17/2013 10:12 pm Claudio Fontana

target-arm: A64: add support for 1-src data processing and CLZ

This patch adds support for decoding 1-src data processing insns,
and the first user, C5.6.40 CLZ (count leading zeroes).

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

82e14b02 12/17/2013 10:12 pm Alexander Graf

target-arm: A64: add support for 1-src RBIT insn

This adds support for the C5.6.147 RBIT instruction.

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder, use bswap64,
make RBIT part standalone from the rest of the patch,...

45323209 12/17/2013 10:12 pm Claudio Fontana

target-arm: A64: add support for 1-src REV insns

This adds support for C5.6.149 REV, C5.6.151 REV32, C5.6.150 REV16.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

88077742 12/17/2013 10:12 pm Claudio Fontana

target-arm: A64: add support for bitfield insns

This patch implements the C3.4.2 Bitfield instructions:
SBFM, BFM, UBFM.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

e80c5020 12/17/2013 10:12 pm Claudio Fontana

target-arm: A64: add support for 1-src CLS insn

this patch adds support for the CLS instruction.

Signed-off-by: Claudio Fontana <>
Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>

71b46089 12/17/2013 10:12 pm Alexander Graf

target-arm: A64: add support for logical (immediate) insns

This patch adds support for C3.4.4 Logical (immediate),
which include AND, ANDS, ORR, EOR.

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder, function renaming,
removed a TCG temp variable]...

832ffa1c 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for logical (shifted register)

Add support for the instructions described in "C3.5.10 Logical
(shifted register)".

We store the flags in the same locations as the 32 bit decoder.
This is slightly awkward when calculating 64 bit results, but seems...

15bfe8b6 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for ADR and ADRP

Add support for the instructions described in
"C3.4.6 PC-rel. addressing" (ADR and ADRP).

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder structure]
Signed-off-by: Claudio Fontana <>...

b001c8c3 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for BR, BLR and RET insns

Implement BR, BLR and RET. This is all of the 'unconditional
branch (register)' instruction category except for ERET
and DPRS (which are system mode only).

Signed-off-by: Alexander Graf <>...

39fb730a 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for conditional branches

This patch adds emulation for the conditional branch (b.cond) instruction.

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder structure,
reused arm infrastructure for checking the flags]...

db0f7958 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for 'test and branch' imm

This patch adds emulation for the test and branch insns,
TBZ and TBNZ.

Signed-off-by: Alexander Graf <>
[claudio:
adapted for new decoder
always compare with 0
remove a TCG temporary...

60e53388 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for compare and branch imm

This patch adds emulation for the compare and branch insns,
CBZ and CBNZ.

Signed-off-by: Alexander Graf <>
[claudio: adapted to new decoder,
compare with immediate 0,
introduce read_cpu_reg to get the 0 extension on (!sf)]...

e952d8c7 12/17/2013 09:42 pm Claudio Fontana

target-arm: A64: add support for conditional select

This patch adds support for the instruction group "C3.5.6
Conditional select": CSEL, CSINC, CSINV, CSNEG.

Signed-off-by: Claudio Fontana <>
[PMM: Improved code generated in the nomatch case as per RTH suggestions]...

ad7ee8a2 12/17/2013 09:42 pm Claudio Fontana

target-arm: A64: provide skeleton for a64 insn decoding

Provide a skeleton for a64 instruction decoding in translate-a64.c,
by dividing instructions into the classes defined by the
ARM Architecture Reference Manual(DDI0487A_a) section C3.

Signed-off-by: Claudio Fontana <>...

87462e0f 12/17/2013 09:42 pm Claudio Fontana

target-arm: A64: expand decoding skeleton for system instructions

Decode the various kinds of system instructions:
hints (HINT), which include NOP, YIELD, WFE, WFI, SEV, SEL
sync instructions, which include CLREX, DSB, DMB, ISB
msr_i, which move immediate to processor state field...

11e169de 12/17/2013 09:42 pm Alexander Graf

target-arm: A64: add support for B and BL insns

Implement the B and BL instructions (PC relative branches and calls).

For convenience in managing TCG temporaries which might be generated
if a source register is the zero-register XZR, we provide a simple...

40f860cd 12/17/2013 09:42 pm Peter Maydell

target-arm: Split A64 from A32/T32 gen_intermediate_code_internal()

The A32/T32 gen_intermediate_code_internal() is complicated because it
has to deal with: * conditionally executed instructions * Thumb IT blocks * kernel helper page * M profile exception-exit special casing...

d356312f 12/17/2013 09:42 pm Peter Maydell

target-arm: Clean up handling of AArch64 PSTATE

The env->pstate field is a little odd since it doesn't strictly
speaking represent an architectural register. However it's convenient
for QEMU to use it to hold the various PSTATE architectural bits
in the same format the architecture specifies for SPSR registers...

14ade10f 09/10/2013 09:11 pm Alexander Graf

target-arm: Add AArch64 translation stub

We should translate AArch64 mode separately from AArch32 mode. In AArch64 mode,
registers look vastly different, instruction encoding is completely different,
basically the system turns into a different machine.

So let's do a simple if() in translate.c to decide whether we can handle the...