Improved Windows ABI support
This commit is contained in:
parent
91a3ec9d52
commit
b3fec98baf
22 changed files with 124 additions and 32 deletions
25
src/asm/Number.go
Normal file
25
src/asm/Number.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package asm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Number operates with just a number.
|
||||
type Number struct {
|
||||
Number int
|
||||
}
|
||||
|
||||
// String returns a human readable version.
|
||||
func (data *Number) String() string {
|
||||
return fmt.Sprintf("%d", data.Number)
|
||||
}
|
||||
|
||||
// Number adds an instruction with a number.
|
||||
func (a *Assembler) Number(mnemonic Mnemonic, number int) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
Mnemonic: mnemonic,
|
||||
Data: &Number{
|
||||
Number: number,
|
||||
},
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue