Implemented bit shifts
This commit is contained in:
@ -184,6 +184,18 @@ func (a Assembler) Finalize() ([]byte, []byte) {
|
||||
case RETURN:
|
||||
code = x64.Return(code)
|
||||
|
||||
case SHIFTL:
|
||||
switch operands := x.Data.(type) {
|
||||
case *RegisterNumber:
|
||||
code = x64.ShiftLeftNumber(code, operands.Register, byte(operands.Number)&0b111111)
|
||||
}
|
||||
|
||||
case SHIFTRS:
|
||||
switch operands := x.Data.(type) {
|
||||
case *RegisterNumber:
|
||||
code = x64.ShiftRightSignedNumber(code, operands.Register, byte(operands.Number)&0b111111)
|
||||
}
|
||||
|
||||
case STORE:
|
||||
switch operands := x.Data.(type) {
|
||||
case *MemoryNumber:
|
||||
|
Reference in New Issue
Block a user