Dear SeaBIOS folks,
using Debian Sid/unstable and Clang 3.2 from Debian experimental
$ clang --version Debian clang version 3.2-1~exp6 (tags/RELEASE_32/final) (based on LLVM 3.2) Target: i386-pc-linux-gnu Thread model: posix
to build SeaBIOS, Clang throws the following errors.
$ git show commit f465e1ec1b01826100c92b890487a2ab09bfe2c1 Author: Kevin O'Connor kevin@koconnor.net Date: Sat Feb 23 21:33:36 2013 -0500
Minor - introduce numeric defines for the IVT offset of hw irqs. $ make menuconfig # coreboot chosen, see attached $ CC=clang make […] In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^ <inline asm>:1:12: note: instantiated into assembly here rep outsw %es:(%esi), (%dx) ^~~~~~~~~~ In file included from src/ata.c:9: src/ioport.h:113:18: error: invalid operand for instruction asm volatile("rep insw (%%dx), %%es:(%%edi)" ^ <inline asm>:1:11: note: instantiated into assembly here rep insw (%dx), %es:(%edi) ^~~~~ 2 errors generated. make: *** [out/ata.o] Fehler 1
I have no clue about assembler programming, so before reporting both errors to the Clang project, as it works with GCC, I want to make sure that Clang is mistaken here.
Thanks,
Paul
On Mon, Mar 04, 2013 at 04:15:51PM +0100, Paul Menzel wrote:
to build SeaBIOS, Clang throws the following errors.
[...]
In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^
I'm not familiar with Clang, but I don't see anything wrong with this particular assembler statement. Is this the only thing Clang has issues with?
-Kevin
On 03/04/2013 03:58 PM, Kevin O'Connor wrote:
On Mon, Mar 04, 2013 at 04:15:51PM +0100, Paul Menzel wrote:
to build SeaBIOS, Clang throws the following errors.
[...]
In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^
I'm not familiar with Clang, but I don't see anything wrong with this particular assembler statement. Is this the only thing Clang has issues with?
Wouldn't simply "es rep outsw" be better? The operands are implicit anyway, except for the source segment override.
-hpa
On Tue, Mar 05, 2013 at 03:20:57PM -0800, H. Peter Anvin wrote:
On 03/04/2013 03:58 PM, Kevin O'Connor wrote:
On Mon, Mar 04, 2013 at 04:15:51PM +0100, Paul Menzel wrote:
to build SeaBIOS, Clang throws the following errors.
[...]
In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^
I'm not familiar with Clang, but I don't see anything wrong with this particular assembler statement. Is this the only thing Clang has issues with?
Wouldn't simply "es rep outsw" be better? The operands are implicit anyway, except for the source segment override.
I kind of prefer to be explicit with the source operands (for documentation purposes). Otherwise, it's not really a big deal. Paul, does Clang prefer "es rep outsw"?
-Kevin
Am Montag, den 04.03.2013, 18:58 -0500 schrieb Kevin O'Connor:
On Mon, Mar 04, 2013 at 04:15:51PM +0100, Paul Menzel wrote:
to build SeaBIOS, Clang throws the following errors.
[...]
In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^
I'm not familiar with Clang, but I don't see anything wrong with this particular assembler statement.
Alright, then I will report that to the Clang folks.
Is this the only thing Clang has issues with?
I am not sure, as the build stops after this error.
Thanks,
Paul
Am Mittwoch, den 06.03.2013, 11:49 +0100 schrieb Paul Menzel:
Am Montag, den 04.03.2013, 18:58 -0500 schrieb Kevin O'Connor:
On Mon, Mar 04, 2013 at 04:15:51PM +0100, Paul Menzel wrote:
to build SeaBIOS, Clang throws the following errors.
[...]
In file included from src/ata.c:9: src/ioport.h:126:18: error: invalid operand for instruction asm volatile("rep outsw %%es:(%%esi), (%%dx)" ^
I'm not familiar with Clang, but I don't see anything wrong with this particular assembler statement.
Alright, then I will report that to the Clang folks.
This issue is tracked in ticket 15455 in the LLVM Bugzilla bug tracking system [1].
Is this the only thing Clang has issues with?
I am not sure, as the build stops after this error.
[…]
Thanks,
Paul