[GHC] #16298: Awful(?) code in AArch64 stg_BLACKHOLE entry code

#16298: Awful(?) code in AArch64 stg_BLACKHOLE entry code
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.7
Keywords: | Operating System: Unknown/Multiple
Architecture: aarch64 | Type of failure: Runtime
| performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
It's been a while since I've look at ARM assembler but this doesn't look
right:
{{{
Dump of assembler code for function stg_BLACKHOLE_info$def:
0x0000ffffb66d6118 <+0>: mov x23, x22
0x0000ffffb66d611c <+4>: ldr x22, [x22, #8]
0x0000ffffb66d6120 <+8>: tst x22, #0x7
0x0000ffffb66d6124 <+12>: b.ne 0xffffb66d6224

#16298: Awful(?) code in AArch64 stg_BLACKHOLE entry code
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: aarch64
Type of failure: Runtime | Test Case:
performance bug |
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
I have been staring more at this code and have found it's even worse than
I thought. Far more repetition than I would have thought would be
necessary. Here's the full dump:
{{{
Dump of assembler code for function stg_BLACKHOLE_info$def:
0x0000ffffb66d6118 <+0>: mov x23, x22 // x23 == x22 ==
blackhole closure
0x0000ffffb66d611c <+4>: ldr x22, [x22, #8] // x22 =
bh->indirectee
0x0000ffffb66d6120 <+8>: tst x22, #0x7 //
GET_TAG(bh->indirectee) == 0?
0x0000ffffb66d6124 <+12>: b.ne 0xffffb66d6224
participants (1)
-
GHC