Added RISC-V to the todo list
This commit is contained in:
parent
42f0367a94
commit
cd1119add2
@ -165,8 +165,8 @@ This is what generates expressions from tokens.
|
||||
### Architecture
|
||||
|
||||
- [ ] arm64
|
||||
- [ ] wasm
|
||||
- [x] x86-64
|
||||
- [ ] riscv
|
||||
- [x] x64
|
||||
|
||||
### Platform
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package register
|
||||
package arm64
|
||||
|
||||
import "git.akyoto.dev/cli/q/src/build/cpu"
|
||||
|
||||
|
40
src/build/arch/riscv/Registers.go
Normal file
40
src/build/arch/riscv/Registers.go
Normal file
@ -0,0 +1,40 @@
|
||||
package riscv
|
||||
|
||||
import "git.akyoto.dev/cli/q/src/build/cpu"
|
||||
|
||||
const (
|
||||
X0 cpu.Register = iota
|
||||
X1
|
||||
X2
|
||||
X3
|
||||
X4
|
||||
X5
|
||||
X6
|
||||
X7
|
||||
X8
|
||||
X9
|
||||
X10
|
||||
X11
|
||||
X12
|
||||
X13
|
||||
X14
|
||||
X15
|
||||
X16
|
||||
X17
|
||||
X18
|
||||
X19
|
||||
X20
|
||||
X21
|
||||
X22
|
||||
X23
|
||||
X24
|
||||
X25
|
||||
X26
|
||||
X27
|
||||
X28
|
||||
X29
|
||||
X30
|
||||
X31
|
||||
)
|
||||
|
||||
var SyscallArgs = []cpu.Register{X10, X11, X12, X13, X14, X15, X16}
|
@ -29,6 +29,5 @@ func encode(code []byte, mod AddressMode, reg cpu.Register, rm cpu.Register, num
|
||||
|
||||
code = append(code, opCodes...)
|
||||
code = append(code, ModRM(mod, byte(reg), byte(rm)))
|
||||
|
||||
return code
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user