[LLVMdev] inline asm semantics: output constraint width smaller than input
Chris Lattner
clattner at apple.com
Tue Jan 27 13:00:26 PST 2009
On Jan 27, 2009, at 12:36 PM, Török Edwin wrote:
> On 2009-01-27 22:24, Duncan Sands wrote:
>> On Tuesday 27 January 2009 20:56:30 Mike Stump wrote:
>>
>>> On Jan 27, 2009, at 8:42 PM, Duncan Sands wrote:
>>>
>>>> one thing that seems to be clear to everyone except me is... what
>>>> are the
>>>> semantics supposed to be?
>>>>
>>> I don't know of any other semantic other than, if they are
>>> supposed to
>>> be in the same register, then they have to be in the same register.
>>>
>>
>> Sounds logical! But what is the discussion about then?
>
> LLVM's Codegen is rejecting inline asm when input/output constraints
> have different bitwidths.
>
> For example in the Linux kernel calls to the various __put_user_
> functions take %al, %ax, %eax, %rax/ (%eax:%edx) as input parameter,
> and the output parameter is always an int (%eax). (hope I explained
> this
> right)
Right, the interesting wrinkle is that I think llvm's codegen should
only see matching constraints of the same type. If the front-end sees
an i8 tied to an i32, it should extend the i8 or do whatever else it
needs to do.
-Chris
More information about the llvm-dev
mailing list