|
theadder posted:so hes an antisocial moron (he uses lunix) but is he right my guess, without reading any gcc code (which i'm not allowed to do, lol), is that linus has actually diagnosed the problem correctly, but it's buried under a long discussion of what's probably a red herring (also under a giant pile of assholeishness). the red zone is almost certainly a distraction here. gcc appears to be spilling a simple constant (which is definitely screwy) to a slot which should be well within the stack frame, except unfortunately it's doing that spill just before the stack frame has actually been established. there isn't normally a reason you'd need to materialize a constant in the prologue; wild guess, there's something weird (inline assembly?) at the start of the function, and some piece of code is trying to position a "hey, i need this constant now" assertion before that and isn't being careful enough to avoid the prologue. that mistake is also confusing the register allocator, hence the spill
|
# ¿ Jul 27, 2014 08:41 |
|
|
# ¿ Apr 29, 2024 07:18 |
|
depends on who's handcrafting the poo poo. a modern compiler is probably smarter than you about basic integer/pointer arithmetic, and it knows a lot of subtle crap about instruction ordering and microarchitectural latencies. on the other hand, it's required to follow the platform abi, can easily be blocked by false dependencies, doesn't always know when it's worthwhile to chase trade-offs, doesn't necessarily realize that there's this one perfect instruction for summing the odd bits of a floating-point mantissa, and occasionally just makes bad decisions
|
# ¿ Jul 29, 2014 21:41 |