Bit shift operators
This commit is contained in:
@@ -135,6 +135,26 @@ functions:
|
||||
expectGlobalMemory(t, state, 0, 21)
|
||||
}
|
||||
|
||||
func TestShR(t *testing.T) {
|
||||
state := assembleAndExecute(t, `
|
||||
functions:
|
||||
- - [mov, g0, 53]
|
||||
- [shr, g0, 2]
|
||||
`)
|
||||
|
||||
expectGlobalMemory(t, state, 0, 13)
|
||||
}
|
||||
|
||||
func TestShL(t *testing.T) {
|
||||
state := assembleAndExecute(t, `
|
||||
functions:
|
||||
- - [mov, g0, 53]
|
||||
- [shl, g0, 2]
|
||||
`)
|
||||
|
||||
expectGlobalMemory(t, state, 0, 212)
|
||||
}
|
||||
|
||||
func TestEq(t *testing.T) {
|
||||
state := assembleAndExecute(t, `
|
||||
functions:
|
||||
|
||||
Reference in New Issue
Block a user