[PATCH] 128-bit ABI for x86_64-w64-mingw32 incorrectly generated
David Majnemer
david.majnemer at gmail.com
Mon Oct 21 23:44:19 PDT 2013
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1883
@@ +1882,3 @@
+ Entry.isZExt = false;
+ if (isTailCall) isTailCall = false;
+ }
----------------
What is the point of this? It seems to always set `isTailCall` to `false`.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1895
@@ +1894,3 @@
+ isTailCall = false; // necessary because of the calling convention mismatch between LLVM and native Win64
+ } else {
+ RetTy = RetVT.getTypeForEVT(*DAG.getContext());
----------------
No braces needed.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1872
@@ +1871,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1945
@@ +1944,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2004
@@ +2003,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2026
@@ -1949,1 +2025,3 @@
+ RetTy = RetVT.getTypeForEVT(*DAG.getContext());
+ }
TargetLowering::
----------------
No need for braces around a single statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2156
@@ +2155,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2184
@@ -2086,1 +2183,3 @@
+ RetTy = static_cast<EVT>(MVT::v2i64).getTypeForEVT(*DAG.getContext());
+ }
TargetLowering::
----------------
No need for braces around a single statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1089
@@ +1088,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1112
@@ +1111,3 @@
+ RetTy = RetVT.getTypeForEVT(*DAG.getContext());
+ }
+
----------------
No need for braces around a single statement.
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:88
@@ +87,3 @@
+ if (Win64 && Entry.Node.getValueType().getSizeInBits() > 64) {
+ //printf("win64 libcall arg %d i128*\n", i);
+ SDValue StackPtr = DAG.CreateStackTemporary(Entry.Node.getValueType(), 16);
----------------
Remove this commented out `printf`statement.
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:109
@@ -88,1 +108,3 @@
+ RetTy = RetVT.getTypeForEVT(*DAG.getContext());
+ }
TargetLowering::
----------------
No need for braces around a single statement.
http://llvm-reviews.chandlerc.com/D1998
More information about the llvm-commits
mailing list