Displaying 5 results from an estimated 5 matches for "__ret_pu".
2009 Jan 24
1
[LLVMdev] inline asm semantics: output constraint width smaller than input
On 2009-01-24 19:27, Ingo Molnar wrote:
> * Török Edwin <edwintorok at gmail.com> wrote:
>
>> #define put_user(x, ptr) \
>> ({ \
>> - int __ret_pu; \
>> + __typeof__(*(ptr)) __ret_pu; \
>>
>
> This does not look right. We can sometimes have put_user() of non-integer
> types (say structures).
I didn't encounter it with my .config, but it is certainly possible.
I think us...
2009 Jan 24
0
[LLVMdev] inline asm semantics: output constraint width smaller than input
...k; \
> } \
> (x) = (__typeof__(*(ptr)))__val_gu; \
> - __ret_gu; \
> + (int)__ret_gu; \
> })
>
> #define __put_user_x(size, x, ptr, __ret_pu) \
> @@ -239,11 +239,13 @@ extern void __put_user_8(void);
> */
> #define put_user(x, ptr) \
> ({ \
> - int __ret_pu; \
> + __typeof__(*(ptr)) __ret_pu; \
This does not lo...
2009 Jan 24
5
[LLVMdev] inline asm semantics: output constraint width smaller than input
...__get_user_bad(void);
break; \
} \
(x) = (__typeof__(*(ptr)))__val_gu; \
- __ret_gu; \
+ (int)__ret_gu; \
})
#define __put_user_x(size, x, ptr, __ret_pu) \
@@ -239,11 +239,13 @@ extern void __put_user_8(void);
*/
#define put_user(x, ptr) \
({ \
- int __ret_pu; \
+ __typeof__(*(ptr)) __ret_pu; \
__typeof__(*(ptr)) __pu_val;...
2009 Jan 27
0
[LLVMdev] inline asm semantics: output constraint width smaller than input
...%edx) as input parameter,
and the output parameter is always an int (%eax). (hope I explained this
right)
But if I got it right, the input can also be a struct (who's size is 1,
2, 4, 8-byte) that fits in a register.
Not sure if this ever occurs in practice.
#define __put_user_x(size, x, ptr, __ret_pu) \
asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
:"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define put_user(x, ptr) \
({ \
int __ret_pu;...
2009 Jan 27
3
[LLVMdev] inline asm semantics: output constraint width smaller than input
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.