diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2016-07-04 13:06:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-04 13:15:22 +0100 |
commit | 684204593d9b81ba4cd4c441b5ee395a29cff606 (patch) | |
tree | 619707acc63ada3691db1c3bdfaca5904a1ae7e0 /target-m68k | |
parent | 0b73c9bb066c6b66a9466ad9c3bbfd841477bf50 (diff) | |
download | qemu-684204593d9b81ba4cd4c441b5ee395a29cff606.zip qemu-684204593d9b81ba4cd4c441b5ee395a29cff606.tar.gz qemu-684204593d9b81ba4cd4c441b5ee395a29cff606.tar.bz2 |
register: Define REG and FIELD macros
Define some macros that can be used for defining registers and fields.
The REG32 macro will define A_FOO, for the byte address of a register
as well as R_FOO for the uint32_t[] register number (A_FOO / 4).
The FIELD macro will define FOO_BAR_MASK, FOO_BAR_SHIFT and
FOO_BAR_LENGTH constants for field BAR in register FOO.
Finally, there are some shorthand helpers for extracting/depositing
fields from registers based on these naming schemes.
Usage can greatly reduce the verbosity of device code.
The deposit and extract macros (eg FIELD_EX32, FIELD_DP32 etc.) can be
used to generate extract and deposits without any repetition of the name
stems.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: bbd87a3c03b1f173b1ed73a6d502c0196c18a72f.1467053537.git.alistair.francis@xilinx.com
[ EI Changes:
* Add Deposit macros
]
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-m68k')
0 files changed, 0 insertions, 0 deletions