mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
accel/tcg: Add endian-specific cpu_{ld, st}* operations
We currently have target-endian versions of these operations, but no easy way to force a specific endianness. This can be helpful if the target has endian-specific operations, or a mode that swaps endianness. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200508154359.7494-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
069cfe77d6
commit
b9e60257c1
4 changed files with 587 additions and 182 deletions
|
@ -97,9 +97,9 @@ function, which is a return address into the generated code.
|
|||
|
||||
Function names follow the pattern:
|
||||
|
||||
load: ``cpu_ld{sign}{size}_mmuidx_ra(env, ptr, mmuidx, retaddr)``
|
||||
load: ``cpu_ld{sign}{size}{end}_mmuidx_ra(env, ptr, mmuidx, retaddr)``
|
||||
|
||||
store: ``cpu_st{size}_mmuidx_ra(env, ptr, val, mmuidx, retaddr)``
|
||||
store: ``cpu_st{size}{end}_mmuidx_ra(env, ptr, val, mmuidx, retaddr)``
|
||||
|
||||
``sign``
|
||||
- (empty) : for 32 or 64 bit sizes
|
||||
|
@ -112,9 +112,14 @@ store: ``cpu_st{size}_mmuidx_ra(env, ptr, val, mmuidx, retaddr)``
|
|||
- ``l`` : 32 bits
|
||||
- ``q`` : 64 bits
|
||||
|
||||
``end``
|
||||
- (empty) : for target endian, or 8 bit sizes
|
||||
- ``_be`` : big endian
|
||||
- ``_le`` : little endian
|
||||
|
||||
Regexes for git grep:
|
||||
- ``\<cpu_ld[us]\?[bwlq]_mmuidx_ra\>``
|
||||
- ``\<cpu_st[bwlq]_mmuidx_ra\>``
|
||||
- ``\<cpu_ld[us]\?[bwlq](_[bl]e)\?_mmuidx_ra\>``
|
||||
- ``\<cpu_st[bwlq](_[bl]e)\?_mmuidx_ra\>``
|
||||
|
||||
``cpu_{ld,st}*_data_ra``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -129,9 +134,9 @@ be performed with a context other than the default.
|
|||
|
||||
Function names follow the pattern:
|
||||
|
||||
load: ``cpu_ld{sign}{size}_data_ra(env, ptr, ra)``
|
||||
load: ``cpu_ld{sign}{size}{end}_data_ra(env, ptr, ra)``
|
||||
|
||||
store: ``cpu_st{size}_data_ra(env, ptr, val, ra)``
|
||||
store: ``cpu_st{size}{end}_data_ra(env, ptr, val, ra)``
|
||||
|
||||
``sign``
|
||||
- (empty) : for 32 or 64 bit sizes
|
||||
|
@ -144,9 +149,14 @@ store: ``cpu_st{size}_data_ra(env, ptr, val, ra)``
|
|||
- ``l`` : 32 bits
|
||||
- ``q`` : 64 bits
|
||||
|
||||
``end``
|
||||
- (empty) : for target endian, or 8 bit sizes
|
||||
- ``_be`` : big endian
|
||||
- ``_le`` : little endian
|
||||
|
||||
Regexes for git grep:
|
||||
- ``\<cpu_ld[us]\?[bwlq]_data_ra\>``
|
||||
- ``\<cpu_st[bwlq]_data_ra\>``
|
||||
- ``\<cpu_ld[us]\?[bwlq](_[bl]e)\?_data_ra\>``
|
||||
- ``\<cpu_st[bwlq](_[bl]e)\?_data_ra\>``
|
||||
|
||||
``cpu_{ld,st}*_data``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -163,9 +173,9 @@ the CPU state anyway.
|
|||
|
||||
Function names follow the pattern:
|
||||
|
||||
load: ``cpu_ld{sign}{size}_data(env, ptr)``
|
||||
load: ``cpu_ld{sign}{size}{end}_data(env, ptr)``
|
||||
|
||||
store: ``cpu_st{size}_data(env, ptr, val)``
|
||||
store: ``cpu_st{size}{end}_data(env, ptr, val)``
|
||||
|
||||
``sign``
|
||||
- (empty) : for 32 or 64 bit sizes
|
||||
|
@ -178,9 +188,14 @@ store: ``cpu_st{size}_data(env, ptr, val)``
|
|||
- ``l`` : 32 bits
|
||||
- ``q`` : 64 bits
|
||||
|
||||
``end``
|
||||
- (empty) : for target endian, or 8 bit sizes
|
||||
- ``_be`` : big endian
|
||||
- ``_le`` : little endian
|
||||
|
||||
Regexes for git grep
|
||||
- ``\<cpu_ld[us]\?[bwlq]_data\>``
|
||||
- ``\<cpu_st[bwlq]_data\+\>``
|
||||
- ``\<cpu_ld[us]\?[bwlq](_[bl]e)\?_data\>``
|
||||
- ``\<cpu_st[bwlq](_[bl]e)\?_data\+\>``
|
||||
|
||||
``cpu_ld*_code``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue