Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17778
b: refs/heads/master
c: 7043ad4
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle authored and unknown committed Jan 10, 2006
1 parent 6c765c3 commit cf48d1e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15265251c5c68fbabdf561cf704e3e305349715a
refs/heads/master: 7043ad4f4c81914ca9e2cd2208c8f4801ed63735
20 changes: 15 additions & 5 deletions trunk/include/asm-mips/hazards.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,25 @@ __asm__(
#endif

#ifdef CONFIG_CPU_MIPSR2
/*
* gcc has a tradition of misscompiling the previous construct using the
* address of a label as argument to inline assembler. Gas otoh has the
* annoying difference between la and dla which are only usable for 32-bit
* rsp. 64-bit code, so can't be used without conditional compilation.
* The alterantive is switching the assembler to 64-bit code which happens
* to work right even for 32-bit code ...
*/
#define instruction_hazard() \
do { \
__label__ __next; \
unsigned long tmp; \
\
__asm__ __volatile__( \
" .set mips64r2 \n" \
" dla %0, 1f \n" \
" jr.hb %0 \n" \
: \
: "r" (&&__next)); \
__next: \
; \
" .set mips0 \n" \
"1: \n" \
: "=r" (tmp)); \
} while (0)

#else
Expand Down

0 comments on commit cf48d1e

Please sign in to comment.