fixedsync/minor_31: add stqcx. because I'm adding the others anyway
authorJacob Lifshay <programmerjake@gmail.com>
Mon, 4 Dec 2023 09:42:31 +0000 (01:42 -0800)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Dec 2023 09:34:40 +0000 (09:34 +0000)
openpower/isa/fixedsync.mdwn
openpower/isatables/LDSTRM-2P-3S.csv
openpower/isatables/minor_31.csv

index 5a5998f6ac2accc461d18e114a96a6f8040f2499..13c1f6ef500a411c451903b208de26fef0949da8 100644 (file)
@@ -275,3 +275,44 @@ Special Registers Altered:
 
     CR0
 
+# Store Quadword Conditional Indexed
+
+X-Form
+
+* stqcx. RSp,RA,RB
+
+Pseudo-code:
+
+    EA <- (RA|0) + (RB)
+    undefined_case <- 0
+    store_performed <- 0b0
+    if RESERVE then
+        if ((RESERVE_LENGTH = 16) &
+           (RESERVE_ADDR = real_addr(EA))) then
+            MEM(EA, 16) <- (RSp)
+            undefined_case <- 0
+            store_performed <- 0b1
+        else
+            # set z to smallest real page size supported by implementation
+            z <- REAL_PAGE_SIZE
+            if (RESERVE_ADDR / z) = (real_addr(EA) / z) then
+                undefined_case <- 1
+            else
+                undefined_case <- 0
+                store_performed <- 0b0
+    else
+        undefined_case <- 0
+        store_performed <- 0b0
+    if undefined_case then
+        u1 <- undefined(0b1)
+        if u1 then
+            MEM(EA, 16) <- (RSp)
+        u2 <- undefined(0b1)
+        CR0 <- 0b00 || u2 || XER[SO]
+    else
+        CR0 <- 0b00 || store_performed || XER[SO]
+    RESERVE <- 0
+
+Special Registers Altered:
+
+    CR0
index a60fc070ec1d3f7b19d76d699acba2e58895fb57..76b2123f4c17cd49a3be6f2758a84f84ac15e18e 100644 (file)
@@ -14,6 +14,7 @@ stbcix,LDST_IDX,,2P,EXTRA2,EN,s:RS,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,0,0
 stfiwx,LDST_IDX,,2P,EXTRA2,EN,s:FRS,s:RA,s:RB,0,RA_OR_ZERO,RB,FRS,0,0,0,0
 stdcix,LDST_IDX,,2P,EXTRA2,EN,s:RS,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,0,0
 stwcx,LDST_IDX,,2P,EXTRA2,EN,s:RS;d:CR0,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,CR0,0
+stqcx,LDST_IDX,,2P,EXTRA2,EN,s:RS;d:CR0,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,CR0,0
 stdcx,LDST_IDX,,2P,EXTRA2,EN,s:RS;d:CR0,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,CR0,0
 stbcx,LDST_IDX,,2P,EXTRA2,EN,s:RS;d:CR0,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,CR0,0
 sthcx,LDST_IDX,,2P,EXTRA2,EN,s:RS;d:CR0,s:RA,s:RB,0,RA_OR_ZERO,RB,RS,0,0,CR0,0
index 07544f21b9e6e2e8e18844d2163e114e7bd3bc89..69a99a776085224185c8f8667ace0fbfb26f85ab 100644 (file)
@@ -198,6 +198,7 @@ opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry ou
 0b1011010110,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,CR0,0,0,ZERO,0,is2B,0,0,0,1,0,0,ONE,0,1,sthcx,X,,,
 0b0110110111,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,NONE,0,0,ZERO,0,is2B,0,0,1,0,0,0,NONE,0,1,sthux,X,,,
 0b0110010111,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,NONE,0,0,ZERO,0,is2B,0,0,0,0,0,0,NONE,0,1,sthx,X,,,
+0b0010110110,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,CR0,0,0,ZERO,0,is8B,0,0,0,1,0,0,ONE,0,1,stqcx,X,,,FIXME: should probably be is16B and RSp
 0b1010010110,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,NONE,0,0,ZERO,0,is4B,1,0,0,0,0,0,NONE,0,1,stwbrx,X,,,
 0b1110010101,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,NONE,0,0,ZERO,0,is4B,0,0,cix,0,0,0,NONE,0,1,stwcix,X,,,
 0b0010010110,LDST,OP_STORE,RA_OR_ZERO,RB,RS,NONE,NONE,CR0,0,0,ZERO,0,is4B,0,0,0,1,0,0,ONE,0,1,stwcx,X,,,