Commit ff64bb5
committed
cmov: add
In #1332 we ran into LLVM inserting branches in this routine for
`thumbv6m-none-eabi` targets. It was "fixed" by fiddling around with
`black_box` but that seems brittle.
In #1334 we attempted a simple portable `asm!` optimization barrier
approach but it did not work as expected.
This instead opts to implement one of the fiddliest bits, mask
generation, using ARM assembly instead. The resulting assembly is
actually more efficient than what rustc/LLVM outputs and avoids touching
the stack pointer.
It's a simple enough function to implement in assembly on other
platforms with stable `asm!` too, but this is a start.asm! optimized masknz32 for ARM321 parent 66db811 commit ff64bb5
2 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
117 | 141 | | |
118 | 142 | | |
119 | 143 | | |
| |||
0 commit comments