Commit 98810fe8 authored by ian@well-typed.com's avatar ian@well-typed.com

Fix build on Win64

gcc thought that fourthFloating could be used without being defined.
In actual fact it couldn't, but I've refactored the code so that it
can now see this.
parent 1ae72ac4
......@@ -491,22 +491,15 @@ createAdjustor(int cconv, StgStablePtr hptr,
*/
{
int i = 0;
int fourthFloating;
char *c;
StgWord8 *adj_code;
// determine whether we have 4 or more integer arguments,
// and therefore need to flush one to the stack.
for (c = typeString; *c != '\0'; c++) {
i++;
if (i == 4) {
fourthFloating = (*c == 'f' || *c == 'd');
break;
}
}
if ((typeString[0] == '\0') ||
(typeString[1] == '\0') ||
(typeString[2] == '\0') ||
(typeString[3] == '\0')) {
if (i < 4) {
adjustor = allocateExec(0x38,&code);
adj_code = (StgWord8*)adjustor;
......@@ -525,6 +518,9 @@ createAdjustor(int cconv, StgStablePtr hptr,
}
else
{
int fourthFloating;
fourthFloating = (typeString[3] == 'f' || typeString[3] == 'd');
adjustor = allocateExec(0x58,&code);
adj_code = (StgWord8*)adjustor;
*(StgInt32 *)adj_code = 0x08ec8348;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment