[Bug target/89502] Inefficient access to stack_guard in TCB

2019-02-26 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89502 --- Comment #7 from H.J. Lu --- rtx memory_address_addr_space (machine_mode mode, rtx x, addr_space_t as) { rtx oldx = x; scalar_int_mode address_mode = targetm.addr_space.address_mode (as); x = convert_memory_address_addr_space (address_

[Bug target/89502] Inefficient access to stack_guard in TCB

2019-02-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89502 --- Comment #6 from Uroš Bizjak --- (In reply to H.J. Lu from comment #5) > I think we should avoid %fs:(%edx) address. Is that possible to generate It is what middle-end expands to, so nothing much that we can do here.

[Bug target/89502] Inefficient access to stack_guard in TCB

2019-02-26 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89502 --- Comment #5 from H.J. Lu --- (In reply to Uroš Bizjak from comment #3) > (In reply to H.J. Lu from comment #0) > > x.s: Assembler messages: > > x.s:11: Error: can't encode segment `%fs' with 32-bit address > > x.s:18: Error: can't encode segme

[Bug target/89502] Inefficient access to stack_guard in TCB

2019-02-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89502 --- Comment #4 from Uroš Bizjak --- (In reply to H.J. Lu from comment #1) > Ever better, we can use UNSPEC_TP to handle it: > > movl%fs:24, %ecx > > to save a register. We do, with -O2, but -O1 CSEs the constant into the register for

[Bug target/89502] Inefficient access to stack_guard in TCB

2019-02-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89502 --- Comment #3 from Uroš Bizjak --- (In reply to H.J. Lu from comment #0) > x.s: Assembler messages: > x.s:11: Error: can't encode segment `%fs' with 32-bit address > x.s:18: Error: can't encode segment `%fs' with 32-bit address Is this some new