Commit 3231ec6
committed
[RISC-V] Require --single-hart to build without the A extension
Without A there is no atomic memory operation to emit, so Interlocked and
CmpXchg lower to a plain read/modify/write. Whether that is sufficient depends
on the target running on one hart and never being preempted. Neither the ISA
nor the ABI says anything about that: a soft-float lp64 image is perfectly
normal on rv64imac hardware with threads, and would lose atomicity silently.
So it has to be asserted rather than inferred. Add --single-hart to ilc and
reject an ISA without A unless it is passed. The flag names the property it
claims, and the failure is at compile time rather than at run time.
Signed-off-by: Maxim Menshikov <maksim.menshikov@nethermind.io>1 parent 7fe8cb0 commit 3231ec6
3 files changed
Lines changed: 20 additions & 4 deletions
File tree
- src/coreclr/tools
- Common
- aot/ILCompiler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| |||
0 commit comments