diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-07-02 14:59:08 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-07-02 14:59:08 +0100 |
commit | 98810fe81d8e8c9122c206f08a4639c1a4a77f49 (patch) | |
tree | 9aba31b8ff53bbc2f4a79a6e9837ccfe8b3c65cd /rts/Adjustor.c | |
parent | 1ae72ac45e51e63cbf6f3d627d77acc6a36aa0f9 (diff) | |
download | haskell-98810fe81d8e8c9122c206f08a4639c1a4a77f49.tar.gz |
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.
Diffstat (limited to 'rts/Adjustor.c')
-rw-r--r-- | rts/Adjustor.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c index 789bd691c4..873f3acad1 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -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; |