Displaying 20 results from an estimated 44 matches for "rettype".
Did you mean:
gettype
2017 Oct 04
0
[PATCH 08/13] x86/paravirt: Clean up paravirt_types.h
...#define PV_ALT_SITE(oldinstr, newinstr) \
+ _PV_ALT_SITE(oldinstr, newinstr, PV_TYPE_CONSTRAINT_STR, \
+ PV_CLBR_CONSTRAINT_STR)
/*
* These macros are intended to wrap calls through one of the paravirt
@@ -525,25 +531,24 @@ int paravirt_disable_iospace(void);
#define ____PVOP_CALL(rettype, op, clbr, call_clbr, extra_clbr, \
pre, post, ...) \
- ({ \
- rettype __ret; \
- PVOP_CALL_ARGS; \
- PVOP_TEST_NULL(op); \
+({ \
+ rettype __ret; \
+ PVOP_CALL_ARGS; \
+ PVOP_TEST_NULL(op); \
asm volatile(pre \
- paravirt...
2007 Apr 18
0
[PATCH] paravirt_ops: Clean up paravirt patchable wrappers
...=
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -332,210 +332,80 @@ unsigned paravirt_patch_insns(void *site
* means that all uses must be wrapped in inline functions. This also
* makes sure the incoming and outgoing types are always correct.
*/
-#define PVOP_CALL0(__rettype, __op) \
+#define __PVOP_CALL(rettype, op, pre, post, ...) \
({ \
- __rettype __ret; \
- if (sizeof(__rettype) > sizeof(unsigned long)) { \
- unsigned long long __tmp; \
- unsigned long __ecx; \
- asm volatile(paravirt_alt(PARAVIRT_CALL) \
- : "=A&quo...
2007 Apr 18
0
[PATCH] paravirt_ops: Clean up paravirt patchable wrappers
...=
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -332,210 +332,80 @@ unsigned paravirt_patch_insns(void *site
* means that all uses must be wrapped in inline functions. This also
* makes sure the incoming and outgoing types are always correct.
*/
-#define PVOP_CALL0(__rettype, __op) \
+#define __PVOP_CALL(rettype, op, pre, post, ...) \
({ \
- __rettype __ret; \
- if (sizeof(__rettype) > sizeof(unsigned long)) { \
- unsigned long long __tmp; \
- unsigned long __ecx; \
- asm volatile(paravirt_alt(PARAVIRT_CALL) \
- : "=A&quo...
2017 Oct 04
1
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...\
+ ".popsection\n" \
+
#define PARAVIRT_PATCH(x) \
(offsetof(struct paravirt_patch_template, x) / sizeof(void *))
@@ -559,6 +586,33 @@ int paravirt_disable_iospace(void);
PVOP_CALLEE_OUTPUTS, , \
pre, post, ##__VA_ARGS__)
+#define ____PVOP_ALT_CALL(rettype, native, op, clbr, call_clbr, \
+ extra_clbr, ...) \
+({ \
+ rettype __ret; \
+ PVOP_CALL_ARGS; \
+ PVOP_TEST_NULL(op); \
+ asm volatile(PV_ALT_SITE(native, PV_CALL_STR) \
+ : call_clbr, ASM_CALL_CONSTRAINT \
+ : PV_INPUT_CONSTRAINTS(op, clbr), \...
2016 Dec 08
3
[PATCH 0/2] Fix paravirt fail
Two patches that cure fallout from commit:
3cded4179481 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()")
2016 Dec 08
3
[PATCH 0/2] Fix paravirt fail
Two patches that cure fallout from commit:
3cded4179481 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()")
2017 Oct 04
0
[PATCH 07/13] x86/paravirt: Simplify ____PVOP_CALL()
...), 23 deletions(-)
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index ab7aabe6b668..01f9e10983c1 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -529,29 +529,19 @@ int paravirt_disable_iospace(void);
rettype __ret; \
PVOP_CALL_ARGS; \
PVOP_TEST_NULL(op); \
- /* This is 32-bit specific, but is okay in 64-bit */ \
- /* since this condition will never hold */ \
- if (sizeof(rettype) > sizeof(unsigned long)) { \
- asm volatile(pre \
- paravirt_alt(PARAVIRT_CALL) \
-...
2016 Dec 08
0
[PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL
Commit 3cded4179481 ("x86/paravirt: Optimize native
pv_lock_ops.vcpu_is_preempted()") introduced a paravirt op with bool
return type [*]
It turns out that the PVOP_CALL*() macros miscompile when rettype is
bool. Code that looked like:
83 ef 01 sub $0x1,%edi
ff 15 32 a0 d8 00 callq *0xd8a032(%rip) # ffffffff81e28120 <pv_lock_ops+0x20>
84 c0 test %al,%al
ended up looking like so after PVOP_CALL1() was applied:
83 ef 01...
2006 May 31
1
[LLVMdev] InstVisitor: RetType
Hi,
the docs for InstVisitor say that if RetType != void, one has to override
visitInstruction. What is the reason for that? It's valid to define
visitInstruction like that:
RetTy visitInstruction(Instruction &I) { return RetTy(); }
so assuming RetTy has a sensible default constructor, user won't need to
override visitInstructio...
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality.
For example, instead of:
callq *0xffffffff81e3a400 (pv_irq_ops.save_fl)
vmlinux will now show:
pushfq
pop %rax
nop
nop
nop
nop
nop
which is what the runtime version of the code will show in most cases.
This idea was suggested by Andy Lutomirski.
The benefits are:
- For the most common runtime cases
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality.
For example, instead of:
callq *0xffffffff81e3a400 (pv_irq_ops.save_fl)
vmlinux will now show:
pushfq
pop %rax
nop
nop
nop
nop
nop
which is what the runtime version of the code will show in most cases.
This idea was suggested by Andy Lutomirski.
The benefits are:
- For the most common runtime cases
2004 Mar 02
3
error() and C++ destructors
Hi,
I am writing C++ functions that are to be called via .Call() interface.
I'd been using error() (from R.h) to return to R if there is an error,
but then I realized that this might be not safe as supposedly error()
doesn't throw an exception and therefore some destructors do not get
called and some memory may leak. Here is a simple example
extern "C" void foo() {
string
2013 Dec 04
0
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
...call is a
function pointer type, then that is used *as the type of the thing being
called*, while if it's not, then it is used *as the return type*, and the
type of the call is inferred from the arguments present on the instruction.
See this chunk of code in lib/AsmParser/LLParser.cpp:
// If RetType is a non-function pointer type, then this is the short
syntax
// for the call, which means that RetType is just the return type. Infer
the
// rest of the function argument types from the arguments that are
present.
PointerType *PFTy = 0;
FunctionType *Ty = 0;
if (!(PFTy = dyn_cast<Poi...
2017 Oct 04
1
[PATCH 02/13] x86/paravirt: Fix output constraint macro names
...E_OUTPUTS
#define EXTRA_CLOBBERS , "r8", "r9", "r10", "r11"
#define VEXTRA_CLOBBERS , "rax", "r8", "r9", "r10", "r11"
@@ -552,12 +552,12 @@ int paravirt_disable_iospace(void);
})
#define __PVOP_CALL(rettype, op, pre, post, ...) \
- ____PVOP_CALL(rettype, op, CLBR_ANY, PVOP_CALL_CLOBBERS, \
+ ____PVOP_CALL(rettype, op, CLBR_ANY, PVOP_CALL_OUTPUTS, \
EXTRA_CLOBBERS, pre, post, ##__VA_ARGS__)
#define __PVOP_CALLEESAVE(rettype, op, pre, post, ...) \
____PVOP_CALL(rettype, op.func, CLBR_...
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Whoops... Seems I forgot the asterisk (*) after the cast. Or something.
Because I did insert the cast and it didn't work. But NOW it works.
Thank you for spending some time on this - and also for presenting the
solution.
-- Mikael
2013/12/4 Eli Bendersky <eliben at google.com>
> This code:
>
> declare i32 @printf(i8* nocapture readonly, ...) nounwind
>
> define
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks,
With this series, the bulk of the work of pvops64 is done.
Here, I integrate most of the paravirt.c and paravirt.h files, making
them applicable to both architectures.
CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page
table integration (patches currently being worked on by Jeremy).
Enjoy
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks,
With this series, the bulk of the work of pvops64 is done.
Here, I integrate most of the paravirt.c and paravirt.h files, making
them applicable to both architectures.
CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page
table integration (patches currently being worked on by Jeremy).
Enjoy
2016 Dec 08
1
[PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL
hi, Peter
I think I know the point.
then could we just let __eax rettype(here is bool), not unsigned long?
I does not do tests for my thoughts.
@@ -461,7 +461,9 @@ int paravirt_disable_iospace(void);
#define PVOP_VCALL_ARGS \
unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; \
regi...
2016 Dec 08
1
[PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL
hi, Peter
I think I know the point.
then could we just let __eax rettype(here is bool), not unsigned long?
I does not do tests for my thoughts.
@@ -461,7 +461,9 @@ int paravirt_disable_iospace(void);
#define PVOP_VCALL_ARGS \
unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; \
regi...
2007 Apr 19
3
[RFC, PATCH 1/5] Paravirt_ops full patching.patch
...pecify
* the return type. The macro then uses sizeof() on that type to
@@ -405,6 +404,21 @@ unsigned paravirt_patch_insns(void *site
"0" ((u32)(arg1)), "1" ((u32)(arg2)), \
"2" ((u32)(arg3)), [_arg4] "mr" ((u32)(arg4)))
+#define PVOP_CALL5(rettype, op, arg1, arg2, arg3, arg4, arg5) \
+ __PVOP_CALL(rettype, op, \
+ "push %[_arg5]; push %[_arg4];", \
+ "lea 8(%%esp),%%esp;", \
+ "0" ((u32)(arg1)), "1" ((u32)(arg2)), \
+ "2" ((u32)(arg3)), [_arg4] "mr" ((...