3.1.2 Memory



Load With Sign Extension

Mnemonic Format Unit Semantics Description
lb rQ < r.i = sbyte(s.m + 1*byte) ;ser Load Byte
lh rH < r.i = shalf(s.m + 2*half) ;ser Load Halfword
lw rW < r.i = sword(s.m + 4*word) ;ser Load Word
ld rD < r.j = slong(s.m + 8*long) Load Doubleword
lgb rG < r.i = sbyte(global) ;ser Load Global Byte Long
lgh rG < r.i = shalf(global) ;ser Load Global Halfword Long
lgd rG < r.j = slong(global) Load Global Doubleword Long


Load With Zero Extension

Mnemonic Format Unit Semantics Description
lub rQ < r.i = ubyte(s.m + 1*byte) ;zer Load Unsigned Byte
luh rH < r.i = uhalf(s.m + 2*half) ;zer Load Unsigned Halfword
luw rW < r.i = uword(s.m + 4*word) ;zer Load Unsigned Word


Stores

Mnemonic Format Unit Semantics Description
sb wQ > sbyte(s.m + 1*byte) = r.i Store Byte
sh wH > shalf(s.m + 2*half) = r.i Store Halfword
sw wW > sword(s.m + 4*word) = r.i Store Word
sd wD > slong(s.m + 8*long) = r.j Store Doubleword
sgb wG > sbyte(global) = r.i Store Global Byte Long
sgh wG > shalf(global) = r.i Store Global Halfword Long
sgw wG > sword(global) = r.i Store Global Word Long
sgd wG > slong(global) = r.j Store Global Double Long
szb zQ > sbyte(s.m + 1*byte) = 0 Store Zero Byte
szh zH > shalf(s.m + 2*half) = 0 Store Zero Halfword
szw zW > sword(s.m + 4*word) = 0 Store Zero Word
szd zD > slong(s.m + 8*long) = 0 Store Zero Doubleword
casw cS > tmp=sword(s.m); if (tmp==t.i) { sword(s.m)=r.i; r.j=tmp; } Compare and Swap Word
casl cS > tmp=slong(s.m); if (tmp==t.j) { slong(s.m)=r.j; r.j=tmp; } Compare and Swap Longword