Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53932
b: refs/heads/master
c: e859dc5
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed May 2, 2007
1 parent 0fd0401 commit 08646ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3671df8572a299acff9c9cac2bf7279ee614d154
refs/heads/master: e859dc553c857f4672b3bbb73ee9170a901f8712
15 changes: 15 additions & 0 deletions trunk/include/asm-i386/alternative.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ static inline void alternatives_smp_switch(int smp) {}
"663:\n\t" newinstr "\n664:\n" /* replacement */\
".previous" :: "i" (feature), ##input)

/* Like alternative_input, but with a single output argument */
#define alternative_io(oldinstr, newinstr, feature, output, input...) \
asm volatile ("661:\n\t" oldinstr "\n662:\n" \
".section .altinstructions,\"a\"\n" \
" .align 4\n" \
" .long 661b\n" /* label */ \
" .long 663f\n" /* new instruction */ \
" .byte %c[feat]\n" /* feature bit */ \
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous\n" \
".section .altinstr_replacement,\"ax\"\n" \
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous" : output : [feat] "i" (feature), ##input)

/*
* Alternative inline assembly for SMP.
*
Expand Down

0 comments on commit 08646ff

Please sign in to comment.