Created
September 15, 2022 22:25
-
-
Save erique/d6ff19dbfc7c810fd89e6070186768bb to your computer and use it in GitHub Desktop.
calling mathieeedoubbas fails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// m68k-amigaos-gcc -noixemul -m68060 -lm ceil_error.c -o ceil_error | |
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
printf("GCC %s\n", __VERSION__); | |
double value = 3.125; | |
uint64_t clamped = (uint64_t)ceil(value); | |
printf("clamped = %08llx ; %s\n", clamped, (clamped == 4) ? "PASS" : "FAIL"); | |
return clamped; | |
} |
Author
erique
commented
Sep 15, 2022
00001068 00001068 _ceil:
1068: 2f0e move.l a6,-(sp)
106a: 202f 0008 move.l 8(sp),d0
106e: 222f 000c move.l 12(sp),d1
1072: 2c79 0000 0114 movea.l 114 114 _MathIeeeDoubBasBase,a6
1078: 4eae ffa0 jsr -96(a6)
107c: 2c5f movea.l (sp)+,a6
107e: 4e75 rts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment