Bug 38350 - odd extra unused stack space/register allocated with asm
Summary: odd extra unused stack space/register allocated with asm
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.3
: P3 minor
Target Milestone: ---
Assignee: Hans-Peter Nilsson
URL:
Keywords: inline-asm
Depends on:
Blocks:
 
Reported: 2008-12-01 15:15 UTC by Hans-Peter Nilsson
Modified: 2021-09-13 21:33 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: cris-axis-elf
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-01 15:20:43


Attachments
testcase (473 bytes, text/plain)
2008-12-01 15:20 UTC, Hans-Peter Nilsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2008-12-01 15:15:28 UTC
For the attached code, there's no reason why the generated code at -O2 would need an unused stack-slot (a second with -march=v10, a first with -march=v32) when operand 5 (the last) of the asm is "g" than if it's "X".  Using "X" seems a little awkward life-time-wise because the input is supposed to be valid.
I don't see this oddness on the host with native 4.1.2 on the host, with/without -m32.
Comment 1 Hans-Peter Nilsson 2008-12-01 15:20:04 UTC
Created attachment 16801 [details]
testcase

Change the last constraint from g to X and compile with 4.3-branch r142284 with
-O2 -march=v32 and -O2 -march=v10 to expose the oddness.