https://bugs.llvm.org/show_bug.cgi?id=48428
Bug ID: 48428
Summary: x32: support variadic functions
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: har...@gigawatt.nl
Reporter: har...@gigawatt.nl
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, pengfei.w...@intel.com,
spatel+l...@rotateright.com
The x86-64 ABI defines va_list as:
typedef struct {
unsigned int gp_offset;
unsigned int fp_offset;
void *overflow_arg_area;
void *reg_save_area;
} va_list[1];
LLVM hardcodes size, alignment and member offsets of this struct based on the
LP64 model, where the pointers have a size and alignment of 8 bytes. In the
ILP32 model, this is not correct. This occurs in X86ISelLowering in at least
LowerVACOPY and X86TargetLowering::EmitVAARG64WithCustomInserter.
I am reporting but self-assigning this to make sure it does not get forgotten.
The fixes for this are already available as part of
<https://github.com/hjl-tools/llvm-x32-old/commit/2eec4c329b38cdedc38e1dbd978f0d927cc4a54e>,
just need to be extracted and possibly cleaned up.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs