Improved label consistency
This commit is contained in:
parent
a8d15a4305
commit
1268344238
11 changed files with 36 additions and 31 deletions
|
@ -1,13 +1,9 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// AddBytes adds a sequence of bytes and returns its address as a label.
|
||||
func (f *Function) AddBytes(value []byte) string {
|
||||
f.count.data++
|
||||
label := fmt.Sprintf("data_%s_%d", f.UniqueName, f.count.data)
|
||||
label := f.CreateLabel("data", f.count.data)
|
||||
f.Assembler.SetData(label, value)
|
||||
return label
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue