GCC Bugzilla – Attachment 9418 Details for
Bug 19653
x87 reg allocated for constants for -mfpmath=sse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Re-updated patch (reload.c only)
diffs6.txt (text/plain), 4.41 KB, created by
Dale Johannesen
on 2005-08-02 22:55:36 UTC
(
hide
)
Description:
Re-updated patch (reload.c only)
Filename:
MIME Type:
Creator:
Dale Johannesen
Created:
2005-08-02 22:55:36 UTC
Size:
4.41 KB
patch
obsolete
>Index: reload.c >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/reload.c,v >retrieving revision 1.267.2.3 >diff -u -b -c -3 -p -r1.267.2.3 reload.c >cvs diff: conflicting specifications of output style >*** reload.c 9 Jul 2005 22:05:58 -0000 1.267.2.3 >--- reload.c 2 Aug 2005 22:53:26 -0000 >*************** push_reload (rtx in, rtx out, rtx *inloc >*** 1231,1245 **** > > /* Narrow down the class of register wanted if that is > desirable on this machine for efficiency. */ > if (in != 0) >! class = PREFERRED_RELOAD_CLASS (in, class); > > /* Output reloads may need analogous treatment, different in detail. */ > #ifdef PREFERRED_OUTPUT_RELOAD_CLASS > if (out != 0) >! class = PREFERRED_OUTPUT_RELOAD_CLASS (out, class); > #endif > > /* Make sure we use a class that can handle the actual pseudo > inside any subreg. For example, on the 386, QImode regs > can appear within SImode subregs. Although GENERAL_REGS >--- 1231,1256 ---- > > /* Narrow down the class of register wanted if that is > desirable on this machine for efficiency. */ >+ /* APPLE LOCAL begin 3501055 etc */ >+ { >+ enum reg_class preferred_class = class; >+ > if (in != 0) >! preferred_class = PREFERRED_RELOAD_CLASS (in, class); > > /* Output reloads may need analogous treatment, different in detail. */ > #ifdef PREFERRED_OUTPUT_RELOAD_CLASS > if (out != 0) >! preferred_class = PREFERRED_OUTPUT_RELOAD_CLASS (out, preferred_class); > #endif > >+ /* Discard what the target said if we cannot do it. */ >+ if (preferred_class != NO_REGS >+ || (optional && type == RELOAD_FOR_OUTPUT)) >+ class = preferred_class; >+ } >+ /* APPLE LOCAL end 3501055 etc */ >+ > /* Make sure we use a class that can handle the actual pseudo > inside any subreg. For example, on the 386, QImode regs > can appear within SImode subregs. Although GENERAL_REGS >*************** find_dummy_reload (rtx real_in, rtx real >*** 1964,1970 **** > > /* Narrow down the reg class, the same way push_reload will; > otherwise we might find a dummy now, but push_reload won't. */ >! class = PREFERRED_RELOAD_CLASS (in, class); > > /* See if OUT will do. */ > if (REG_P (out) >--- 1975,1987 ---- > > /* Narrow down the reg class, the same way push_reload will; > otherwise we might find a dummy now, but push_reload won't. */ >! /* APPLE LOCAL begin 3501055 etc */ >! { >! enum reg_class preferred_class = PREFERRED_RELOAD_CLASS (in, class); >! if (class != NO_REGS) >! class = preferred_class; >! } >! /* APPLE LOCAL begin 3501055 etc */ > > /* See if OUT will do. */ > if (REG_P (out) >*************** find_reloads (rtx insn, int replace, int >*** 3470,3487 **** > losers++; > } > >- /* If we can't reload this value at all, reject this >- alternative. Note that we could also lose due to >- LIMIT_RELOAD_RELOAD_CLASS, but we don't check that >- here. */ >- >- if (! CONSTANT_P (operand) >- && (enum reg_class) this_alternative[i] != NO_REGS >- && (PREFERRED_RELOAD_CLASS (operand, >- (enum reg_class) this_alternative[i]) >- == NO_REGS)) >- bad = 1; >- > /* Alternative loses if it requires a type of reload not > permitted for this insn. We can always reload SCRATCH > and objects with a REG_UNUSED note. */ >--- 3487,3492 ---- >*************** find_reloads (rtx insn, int replace, int >*** 3493,3498 **** >--- 3498,3527 ---- > && ! const_to_mem) > bad = 1; > >+ /* APPLE LOCAL begin 3501055 etc */ >+ /* If we can't reload this value at all, reject this >+ alternative. Note that we could also lose due to >+ LIMIT_RELOAD_CLASS, but we don't check that >+ here. */ >+ >+ if (! CONSTANT_P (operand) >+ && (enum reg_class) this_alternative[i] != NO_REGS) >+ { >+ if (PREFERRED_RELOAD_CLASS >+ (operand, (enum reg_class) this_alternative[i]) >+ == NO_REGS) >+ reject = 600; >+ >+ #ifdef PREFERRED_OUTPUT_RELOAD_CLASS >+ if (operand_type[i] == RELOAD_FOR_OUTPUT >+ && PREFERRED_OUTPUT_RELOAD_CLASS >+ (operand, (enum reg_class) this_alternative[i]) >+ == NO_REGS) >+ reject = 600; >+ #endif >+ } >+ /* APPLE LOCAL end 3501055 etc */ >+ > /* We prefer to reload pseudos over reloading other things, > since such reloads may be able to be eliminated later. > If we are reloading a SCRATCH, we won't be generating any
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 19653
:
8080
|
9374
|
9418
|
9445
|
9454