Open norayr opened 7 years ago
this is checked both with 1.1 and 1.95 versions.
with ADRINT branch, compilation issues:
noch@debed /tmp/ocat $ /opt/voc/bin/voc -m test.Mod
test.Mod compiling test. Main program. 1311 chars.
In file included from test.c:8:0:
test.c: In function ‘EnumPtrs’:
test.c:26:19: warning: passing argument 2 of ‘SYSTEM_ENUMR’ from incompatible pointer type
__ENUMR(&test_R, Texts_Reader__typ, 72, 1, P);
^
/opt/voc/2/include/SYSTEM.h:323:57: note: in definition of macro ‘__ENUMR’
#define __ENUMR(adr, typ, size, n, P) SYSTEM_ENUMR(adr, typ, (address)(size), (address)(n), P)
^
/opt/voc/2/include/SYSTEM.h:301:13: note: expected ‘int64 *’ but argument is of type ‘int32 *’
extern void SYSTEM_ENUMR (void *adr, address *typ, address size, address n, void (*P)());
however R.eot becomes TRUE on x86_64 when it has to. (:
Hmm. Texts_Readertyp is declared on line 181 of Texts.c as 'address'. And SYSTEMENUMR expects an 'address', so initially I'm stumped. I don't get the compiler warning on my build in cygwin. The error suggests that texts.c was compiled with address=int32, and SYSTEM.H with address=int64. I can't easily see how that would be possible. To guarantee a clean build you can do
Oops, markdown! both those 'address's should be 'address*'.
Looks like Texts module does not always return R.eot on 64bit systems. Illustration is here. That happens because
in the procedure Read may return TRUE on 64bit systems, while in the same situation it returns FALSE on 32bit systems.
64bit system:![](https://raw.githubusercontent.com/norayr/isp_test/master/screenshot_x86_64_texts.read.png)
32bit system:![](https://raw.githubusercontent.com/norayr/isp_test/master/screenshot_x86_texts.read.png)
this is the macro which implements the IS test:
It's in SYSTEM.h and does not work correctly on 64bit systems.