You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -765,6 +765,13 @@ Defines `Label` with a given value, creating a symbol for it. This can be used s
765
765
766
766
Unlike `Label:`, note that `.definelabel Label,value` is evaluated only once, thus using any expressions that refer to the current state of the assembler (e.g. `org()`, `.`) in combination with `.definelabel` leads to undefined behavior.
767
767
768
+
769
+
```
770
+
.definedatalabel Label,value
771
+
```
772
+
773
+
For architectures other than ARM, this works identically to `.definelabel`, however it can be used to essentially document your intent that the symbol doesn't refer to code. Under ARM architecture, it works identically to `.definearmlabel` (see below).
774
+
768
775
### Function labels
769
776
770
777
```
@@ -895,6 +902,17 @@ ldr r0,=0xFFEEDDCC
895
902
896
903
Inserts a no$gba debug message as described by GBATEK.
897
904
905
+
### Define labels
906
+
907
+
```
908
+
.definearmlabel Label,value
909
+
.definethumblabel Label,value
910
+
```
911
+
912
+
Identical to `.definelabel`, but explicitly createy an ARM or THUMB label regardless of the current mode.
913
+
914
+
Only relevant when linking external code through `.importobj`. ARM uses the least significant bit in addresses to signify whether the code at the target address is using ARM or THUMB mode when setting the program counter through instructions such as `bl` or `blx`. armips automatically remembers the current mode when labels are defined, but this mode may be incorrect when using `.definelabel`. Note that using `.definethumblabel` for data may result in incorrect addresses.
0 commit comments