<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ARM] "Invalid register name" for global register vairables"
href="https://bugs.llvm.org/show_bug.cgi?id=44562">44562</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ARM] "Invalid register name" for global register vairables
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: ARM
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ndesaulniers@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>kristof.beyls@arm.com, llozano@chromium.org, llvm-bugs@lists.llvm.org, peter.smith@linaro.org, srhines@google.com, Ties.Stuij@arm.com
</td>
</tr></table>
<p>
<div>
<pre>Trying to compile U-Boot w/ Clang to remove GCC from Android, I hit the
following build error w/ Clang:
```
register int foo asm("r9");
void bar(void) {
foo = 0;
}
```
<a href="https://godbolt.org/z/_wQi9A">https://godbolt.org/z/_wQi9A</a>
produces:
fatal error: error in backend: Invalid register name "r9".
using "w" still errors, but is not fatal.
This code comes from:
Declaration:
<a href="https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/arch/arm/include/asm/global_data.h#L85-114">https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/arch/arm/include/asm/global_data.h#L85-114</a>
Use:
1.
<a href="https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L91">https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L91</a>
2.
<a href="https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L101">https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L101</a>
3.
<a href="https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L125">https://gitlab.denx.de/u-boot/u-boot/blob/9d5d74c3ccdc78bac969d25e98eab96872e33b5c/lib/efi_loader/efi_boottime.c#L125</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>