Skip to content

linux x86-32 stack not kept 16-byte aligned #9341

@llvmbot

Description

@llvmbot
Bugzilla Link 8969
Resolution FIXED
Resolved on Jan 23, 2011 15:38
Version trunk
OS Linux
Attachments testcase
Reporter LLVM Bugzilla Contributor
CC @asl,@echristo,@sunfishcode

Extended Description

On 32-bit Linux, the stack is supposed to be 16-byte aligned. LLVM doesn't actually do that by default.

The attached .bc file demonstrates:

nlewycky@ducttape:~$ llvm/Debug+Asserts/bin/llc -O0 pp.bc -o -
.file "pp.bc"
.text
.hidden prologProcessor
.globl prologProcessor
.align 16, 0x90
.type prologProcessor,@function
prologProcessor: # @​prologProcessor

BB#0:

      pushl   %ebp
      pushl   %ebx
      pushl   %edi
      pushl   %esi
      subl    $68, %esp

which is 8-byte aligned, not 16-byte aligned. This isn't ABI compliant.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions