Removed unnecessary type conversions
This commit is contained in:
parent
feacc27f49
commit
01342f5318
@ -35,7 +35,7 @@ func (c *compiler) move(x asm.Instruction) {
|
||||
panic("unknown label")
|
||||
}
|
||||
|
||||
return Address(destination)
|
||||
return destination
|
||||
},
|
||||
})
|
||||
} else {
|
||||
|
@ -80,7 +80,7 @@ restart:
|
||||
dataStart, _ := fs.Align(c.codeStart+Address(len(c.code)), config.Align)
|
||||
|
||||
for _, pointer := range c.dataPointers {
|
||||
address := config.BaseAddress + Address(dataStart) + pointer.Resolve()
|
||||
address := config.BaseAddress + dataStart + pointer.Resolve()
|
||||
slice := c.code[pointer.Position : pointer.Position+4]
|
||||
binary.LittleEndian.PutUint32(slice, uint32(address))
|
||||
}
|
||||
@ -89,7 +89,7 @@ restart:
|
||||
importsStart, _ := fs.Align(dataStart+Address(len(c.data)), config.Align)
|
||||
|
||||
for _, pointer := range c.dllPointers {
|
||||
destination := Address(importsStart) + pointer.Resolve()
|
||||
destination := importsStart + pointer.Resolve()
|
||||
delta := destination - Address(c.codeStart+pointer.Position+Address(pointer.Size))
|
||||
slice := c.code[pointer.Position : pointer.Position+4]
|
||||
binary.LittleEndian.PutUint32(slice, uint32(delta))
|
||||
|
Loading…
x
Reference in New Issue
Block a user