Clang disallows ambiguous instructions (GNU as makes some possibly arbitrary choice).
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
This is .code16 text, so gas should interpret the instruction as orw. I do think that orw/orl does not matter much there due to the nature of operation and the fact that x86 is little endian.
I looked at the gdb 'disassemble' output after 'set architecture i8086', and orw is displayed there.
Comment Actions
I thought about that, but I believe orl is "more correct" as we're it's a 32-bit field we're operating on. But I suppose you're right, x86 will always be little endian and and KARGS_FLAGS_CD will always be <= 0xffff so we can save the extra bytes.
Comment Actions
@kib's suggestion, no need to use a larger instruction. pxeldr already uses orb $KARGS_FLAGS_PXE, 0x8(%bx) # kargs->bootflags |=.