@@ -477,44 +477,91 @@ int paravirt_disable_iospace(void);
477
477
ret; \
478
478
})
479
479
480
+ #define ____PVOP_ALT_CALL (ret , op , alt , cond , clbr , call_clbr , \
481
+ extra_clbr , ...) \
482
+ ({ \
483
+ PVOP_CALL_ARGS; \
484
+ PVOP_TEST_NULL(op); \
485
+ asm volatile(ALTERNATIVE(paravirt_alt(PARAVIRT_CALL), \
486
+ alt, cond) \
487
+ : call_clbr, ASM_CALL_CONSTRAINT \
488
+ : paravirt_type(op), \
489
+ paravirt_clobber(clbr), \
490
+ ##__VA_ARGS__ \
491
+ : "memory", "cc" extra_clbr); \
492
+ ret; \
493
+ })
494
+
480
495
#define __PVOP_CALL (rettype , op , ...) \
481
496
____PVOP_CALL(PVOP_RETVAL(rettype), op, CLBR_ANY, \
482
497
PVOP_CALL_CLOBBERS, EXTRA_CLOBBERS, ##__VA_ARGS__)
483
498
499
+ #define __PVOP_ALT_CALL (rettype , op , alt , cond , ...) \
500
+ ____PVOP_ALT_CALL(PVOP_RETVAL(rettype), op, alt, cond, CLBR_ANY,\
501
+ PVOP_CALL_CLOBBERS, EXTRA_CLOBBERS, \
502
+ ##__VA_ARGS__)
503
+
484
504
#define __PVOP_CALLEESAVE (rettype , op , ...) \
485
505
____PVOP_CALL(PVOP_RETVAL(rettype), op.func, CLBR_RET_REG, \
486
506
PVOP_CALLEE_CLOBBERS, , ##__VA_ARGS__)
487
507
508
+ #define __PVOP_ALT_CALLEESAVE (rettype , op , alt , cond , ...) \
509
+ ____PVOP_ALT_CALL(PVOP_RETVAL(rettype), op.func, alt, cond, \
510
+ CLBR_RET_REG, PVOP_CALLEE_CLOBBERS, , ##__VA_ARGS__)
511
+
512
+
488
513
#define __PVOP_VCALL (op , ...) \
489
514
(void)____PVOP_CALL(, op, CLBR_ANY, PVOP_VCALL_CLOBBERS, \
490
515
VEXTRA_CLOBBERS, ##__VA_ARGS__)
491
516
517
+ #define __PVOP_ALT_VCALL (op , alt , cond , ...) \
518
+ (void)____PVOP_ALT_CALL(, op, alt, cond, CLBR_ANY, \
519
+ PVOP_VCALL_CLOBBERS, VEXTRA_CLOBBERS, \
520
+ ##__VA_ARGS__)
521
+
492
522
#define __PVOP_VCALLEESAVE (op , ...) \
493
523
(void)____PVOP_CALL(, op.func, CLBR_RET_REG, \
494
- PVOP_VCALLEE_CLOBBERS, , ##__VA_ARGS__)
524
+ PVOP_VCALLEE_CLOBBERS, , ##__VA_ARGS__)
495
525
526
+ #define __PVOP_ALT_VCALLEESAVE (op , alt , cond , ...) \
527
+ (void)____PVOP_ALT_CALL(, op.func, alt, cond, CLBR_RET_REG, \
528
+ PVOP_VCALLEE_CLOBBERS, , ##__VA_ARGS__)
496
529
497
530
498
531
#define PVOP_CALL0 (rettype , op ) \
499
532
__PVOP_CALL(rettype, op)
500
533
#define PVOP_VCALL0 (op ) \
501
534
__PVOP_VCALL(op)
535
+ #define PVOP_ALT_CALL0 (rettype , op , alt , cond ) \
536
+ __PVOP_ALT_CALL(rettype, op, alt, cond)
537
+ #define PVOP_ALT_VCALL0 (op , alt , cond ) \
538
+ __PVOP_ALT_VCALL(op, alt, cond)
502
539
503
540
#define PVOP_CALLEE0 (rettype , op ) \
504
541
__PVOP_CALLEESAVE(rettype, op)
505
542
#define PVOP_VCALLEE0 (op ) \
506
543
__PVOP_VCALLEESAVE(op)
544
+ #define PVOP_ALT_CALLEE0 (rettype , op , alt , cond ) \
545
+ __PVOP_ALT_CALLEESAVE(rettype, op, alt, cond)
546
+ #define PVOP_ALT_VCALLEE0 (op , alt , cond ) \
547
+ __PVOP_ALT_VCALLEESAVE(op, alt, cond)
507
548
508
549
509
550
#define PVOP_CALL1 (rettype , op , arg1 ) \
510
551
__PVOP_CALL(rettype, op, PVOP_CALL_ARG1(arg1))
511
552
#define PVOP_VCALL1 (op , arg1 ) \
512
553
__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1))
554
+ #define PVOP_ALT_VCALL1 (op , arg1 , alt , cond ) \
555
+ __PVOP_ALT_VCALL(op, alt, cond, PVOP_CALL_ARG1(arg1))
513
556
514
557
#define PVOP_CALLEE1 (rettype , op , arg1 ) \
515
558
__PVOP_CALLEESAVE(rettype, op, PVOP_CALL_ARG1(arg1))
516
559
#define PVOP_VCALLEE1 (op , arg1 ) \
517
560
__PVOP_VCALLEESAVE(op, PVOP_CALL_ARG1(arg1))
561
+ #define PVOP_ALT_CALLEE1 (rettype , op , arg1 , alt , cond ) \
562
+ __PVOP_ALT_CALLEESAVE(rettype, op, alt, cond, PVOP_CALL_ARG1(arg1))
563
+ #define PVOP_ALT_VCALLEE1 (op , arg1 , alt , cond ) \
564
+ __PVOP_ALT_VCALLEESAVE(op, alt, cond, PVOP_CALL_ARG1(arg1))
518
565
519
566
520
567
#define PVOP_CALL2 (rettype , op , arg1 , arg2 ) \
0 commit comments