mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg/x86: add bswap16_i32 ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6837 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8777643e48
commit
5d40cd6302
2 changed files with 7 additions and 0 deletions
|
@ -1034,6 +1034,11 @@ static inline void tcg_out_op(TCGContext *s, int opc,
|
|||
tcg_out_brcond2(s, args, const_args);
|
||||
break;
|
||||
|
||||
case INDEX_op_bswap16_i32:
|
||||
tcg_out8(s, 0x66);
|
||||
tcg_out_modrm(s, 0xc1, SHIFT_ROL, args[0]);
|
||||
tcg_out8(s, 8);
|
||||
break;
|
||||
case INDEX_op_bswap32_i32:
|
||||
tcg_out_opc(s, (0xc8 + args[0]) | P_EXT);
|
||||
break;
|
||||
|
@ -1130,6 +1135,7 @@ static const TCGTargetOpDef x86_op_defs[] = {
|
|||
{ INDEX_op_sub2_i32, { "r", "r", "0", "1", "ri", "ri" } },
|
||||
{ INDEX_op_brcond2_i32, { "r", "r", "ri", "ri" } },
|
||||
|
||||
{ INDEX_op_bswap16_i32, { "r", "0" } },
|
||||
{ INDEX_op_bswap32_i32, { "r", "0" } },
|
||||
|
||||
{ INDEX_op_neg_i32, { "r", "0" } },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue