From: Sandipan Das Date: Sat, 6 Feb 2021 11:47:19 +0000 (+0530) Subject: arch-power: Add byte-reversed load-store instructions X-Git-Tag: develop-gem5-snapshot~55 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baa0bcfae9203a6efee2355422fcc90b14be8b17;p=gem5.git arch-power: Add byte-reversed load-store instructions This adds the following instructions. * Load Halfword Byte-Reverse Indexed (lhbrx) * Load Word Byte-Reverse Indexed (lwbrx) * Load Doubleword Byte-Reverse Indexed (ldbrx) * Store Halfword Byte-Reverse Indexed (sthbrx) * Store Word Byte-Reverse Indexed (stwbrx) * Store Doubleword Byte-Reverse Indexed (stdbrx) Change-Id: Id7aae44c370d6376410ab8c82839b908ea6ca196 Signed-off-by: Sandipan Das --- diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa index 67eebcde4..a0b91790b 100644 --- a/src/arch/power/isa/decoder.isa +++ b/src/arch/power/isa/decoder.isa @@ -248,10 +248,13 @@ decode PO default Unknown::unknown() { 87: lbzx({{ Rt = Mem_ub; }}); 279: lhzx({{ Rt = Mem_uh; }}); 343: lhax({{ Rt = Mem_sh; }}); + 790: lhbrx({{ Rt = swap_byte(Mem_uh); }}); 23: lwzx({{ Rt = Mem_uw; }}); 341: lwax({{ Rt = Mem_sw; }}); 20: lwarx({{ Rt = Mem_uw; Rsv = 1; RsvLen = 4; RsvAddr = EA; }}); + 534: lwbrx({{ Rt = swap_byte(Mem_uw); }}); 21: ldx({{ Rt = Mem; }}); + 532: ldbrx({{ Rt = swap_byte(Mem); }}); 535: lfsx({{ Ft_sf = Mem_sf; }}); 599: lfdx({{ Ft = Mem_df; }}); 855: lfiwax({{ Ft_uw = Mem; }}); @@ -271,6 +274,7 @@ decode PO default Unknown::unknown() { format StoreIndexOp { 215: stbx({{ Mem_ub = Rs_ub; }}); 407: sthx({{ Mem_uh = Rs_uh; }}); + 918: sthbrx({{ Mem_uh = swap_byte(Rs_uh); }}); 151: stwx({{ Mem_uw = Rs_uw; }}); 150: stwcx({{ bool store_performed = false; @@ -288,7 +292,9 @@ decode PO default Unknown::unknown() { CR = cr; Rsv = 0; }}); + 662: stwbrx({{ Mem_uw = swap_byte(Rs_uw); }}); 149: stdx({{ Mem = Rs }}); + 660: stdbrx({{ Mem = swap_byte(Rs); }}); } format StoreIndexUpdateOp {