Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 396826 Details for
Bug 516548
[4.8/4.9] gcc-4.8+ __atomic_* builtins broken on R10000-based MIPS systems.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backport of commit 0d18e650 to gcc-4.8.4 for PR61538
gcc-4.8.4-mips-fix-pr61538.patch (text/plain), 2.23 KB, created by
Joshua Kinard
on 2015-02-18 12:29:26 UTC
(
hide
)
Description:
Backport of commit 0d18e650 to gcc-4.8.4 for PR61538
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2015-02-18 12:29:26 UTC
Size:
2.23 KB
patch
obsolete
>diff -Naurp gcc-4.8.4.orig/gcc/config/mips/mips.c gcc-4.8.4/gcc/config/mips/mips.c >--- gcc-4.8.4.orig/gcc/config/mips/mips.c 2014-01-21 13:49:27.000000000 -0500 >+++ gcc-4.8.4/gcc/config/mips/mips.c 2015-02-18 07:04:30.089948261 -0500 >@@ -12469,7 +12469,14 @@ mips_process_sync_loop (rtx insn, rtx *o > This will sometimes be a delayed branch; see the write code below > for details. */ > mips_multi_add_insn (is_64bit_p ? "scd\t%0,%1" : "sc\t%0,%1", at, mem, NULL); >- mips_multi_add_insn ("beq%?\t%0,%.,1b", at, NULL); >+ >+ /* When using branch likely (-mfix-r10000), the delay slot instruction >+ will be annulled on false. The normal delay slot instructions >+ calculate the overall result of the atomic operation and must not >+ be annulled. To ensure this behaviour unconditionally use a NOP >+ in the delay slot for the branch likely case. */ >+ >+ mips_multi_add_insn ("beq%?\t%0,%.,1b%~", at, NULL); > > /* if (INSN1 != MOVE && INSN1 != LI) NEWVAL = $TMP3 [delay slot]. */ > if (insn1 != SYNC_INSN1_MOVE && insn1 != SYNC_INSN1_LI && tmp3 != newval) >@@ -12477,7 +12484,7 @@ mips_process_sync_loop (rtx insn, rtx *o > mips_multi_copy_insn (tmp3_insn); > mips_multi_set_operand (mips_multi_last_index (), 0, newval); > } >- else if (!(required_oldval && cmp)) >+ else if (!(required_oldval && cmp) && !mips_branch_likely) > mips_multi_add_insn ("nop", NULL); > > /* CMP = 1 -- either standalone or in a delay slot. */ >@@ -12501,12 +12508,12 @@ mips_process_sync_loop (rtx insn, rtx *o > const char * > mips_output_sync_loop (rtx insn, rtx *operands) > { >- mips_process_sync_loop (insn, operands); >- > /* Use branch-likely instructions to work around the LL/SC R10000 > errata. */ > mips_branch_likely = TARGET_FIX_R10000; > >+ mips_process_sync_loop (insn, operands); >+ > mips_push_asm_switch (&mips_noreorder); > mips_push_asm_switch (&mips_nomacro); > mips_push_asm_switch (&mips_noat); >@@ -12528,6 +12535,9 @@ mips_output_sync_loop (rtx insn, rtx *op > unsigned int > mips_sync_loop_insns (rtx insn, rtx *operands) > { >+ /* Use branch-likely instructions to work around the LL/SC R10000 >+ errata. */ >+ mips_branch_likely = TARGET_FIX_R10000; > mips_process_sync_loop (insn, operands); > return mips_multi_num_insns; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 516548
:
380558
| 396826 |
396828