Commit 3481924
math: correct semantics of asm in normalizef32()
Kuratius in the gbadev Discord noticed that this asm statement was
missing a memory input constraint, since it reads from the memory
pointed to by a.
I took a look at it, too, and noticed a couple more things. volatile
isn't necessary because the statement could be eliminated if its outputs
were never used, and the & modifiers aren't necessary because the inputs
aren't read from after the outputs are written to. I also changed the
input's name to match the name of the variable instead of the name of
the register it will be kept in.
None of this affects the generated code with the current toolchain, but
it is a little more correct.1 parent 5cf45a3 commit 3481924
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments