29 October 2021, 08:42 | #1321 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
Sure, but I'd rather not have this dependency just to calculate the gamma correction table at startup. I try to require only Kickstart 3.x libraries whenever possible, and make the rest optional. Later I'll replace this table with a precalculated variant.
|
05 November 2021, 08:42 | #1322 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
I was wondering, would it be possible to include swapstack.o in libnix20.a? It's already present in libnix13.a so it shouldn't cause any issues, as it doesn't get linked unless __stkinit is referenced.
|
06 November 2021, 18:08 | #1323 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
I seem to have a difficult time getting the stackswap code to work. I created a small example that crashes at exit if the stackswap code runs. If I give a large stack before starting the program it exits normally.
stkswaptest.c Code:
extern void __stkinit(void); void * __x = __stkinit; unsigned long __stack = (32*1024); int main(void) { return 0; } m68k-amigaos-gcc -noixemul -m68060 -m68881 -ffast-math -O2 -fomit-frame-pointer -o stkswap stkswaptest.c /opt/amiga/m68k-amigaos/libnix/lib/libm020/libm881/swapstack.o Could this be an issue with libnix? |
27 November 2021, 17:44 | #1324 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
I modified libnix to not use the AmigaOS SwapStack method... ... as for kick 1.3 |
|
29 November 2021, 19:52 | #1325 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
Thanks, I'll test it soon! Do you think it would be possible to include swapstack.o in libnix20.a like it is in libnix13.a?
|
02 December 2021, 11:51 | #1326 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
04 December 2021, 07:44 | #1327 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
Thank you! I retested my all-exhaustive test program, and it no longer crashes at exit. stackwap.o also got linked nicely
|
05 December 2021, 20:16 | #1328 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
fyi: exceptions and rtti should now work with 68000/68010.
|
09 December 2021, 07:12 | #1329 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
Did something change recently regarding the code generation for -m68060? I rebuilt Duke3D to test the recently added control presets, and it now has some graphics glitches, sometimes CON parsing won't work, and the maps won't load. I tried to compare the asm output with -m68040 and it looks like the compiler now emits FPU instructions for certain multiplications. For example what compiles to
muls.l #936,d0becomes Code:
fmove.l d1,fp0 fmul.l #936,fp0 fmod.s #0x4f800000,fp0 fmove.l fp0,d2 Edit: This is a small function that now has FPU instructions with -m68060, but with -m68040 it doesn't: http://franke.ms/cex/z/T7rj6q Last edited by BSzili; 09 December 2021 at 07:54. |
04 January 2022, 01:23 | #1330 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 181
|
Hi,
I am using latest update from github. I cannot complie when using ChooserLabels() and FreeChooserLabels() from <clib/reaction_lib_protos.h>. I got a linker error: undefined reference to `ChooserLabels' Can I workaroud it somehow? For now I found Stephan Rupprecht's reaction library replecemnt source in C, so that functions are just creating standard lists, so I can reimplenet in my code. But it would be great if standard way could work.. I also got similar problem with other reaction function, but again I woraround it with another.. Thank You in advance. |
04 January 2022, 13:28 | #1331 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 181
|
ok, nevermind.. it can be replaced with: AllocChooserNode()
|
09 January 2022, 13:31 | #1332 | ||
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
I rolled that change back a while ago and now I added another feature: Quote:
this is triggered for 68040/68060 if -ffast-math gets used. |
||
09 January 2022, 13:36 | #1333 | ||
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
I rolled that change back a while ago and now I added another feature: Quote:
this is triggered for 68040/68060 if -ffast-math gets used. https://franke.ms/cex/z/75YoWe |
||
09 January 2022, 18:10 | #1334 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,292
|
I see, thanks now it works fine with the latest version.
|
07 February 2022, 10:58 | #1335 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,114
|
Using latest version of amiga-gcc (4766d09 / Dec 24 2021) atan2(-1, 1) has wrong sign when compiling with -m68881 but *without* -noiexemul. I think this is the case for the entire quadrant.
Test case: Code:
#include <stdio.h> #include <math.h> volatile double x = 1, y = -1; int main() { printf("atan2(%f, %f) = %f (%f degrees)\n", y, x, atan2(y, x), atan2(y, x) * 180 / 3.141592653589793); return 0; } Code:
-mcpu=68020 -m68881 -lm atan2(-1.000000, 1.000000) = 0.785398 (45.000000 degrees) -mcpu=68020 -lm atan2(-1.000000, 1.000000) = -0.785398 (-45.000000 degrees) -mcpu=68020 -m68881 -noixemul -lm atan2(-1.000000, 1.000000) = -0.785398 (-45.000000 degrees) |
07 February 2022, 22:08 | #1336 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
the libs for 68881 weren't build, which are returning fp values in fp0... I supplemented the missing combinations to the multilib info and with the correct version linked also the default (newlib) yields the correct result. ... and building takes now: infinite + x% ^^ |
|
08 February 2022, 19:51 | #1337 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,114
|
Quote:
Luckily inf + n = inf Is the change in a development branch? Just curious, like I wrote I don't need it and there's an easy workaround. |
|
14 February 2022, 10:47 | #1338 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,115
|
I'm exploring using this toolchain (and vasm) for a game. I've skimmed this epic thread and done a lot of poking around, and I have a few questions still.
What code is run at startup? I'd like to use -nostartfiles (and -nostdlib) to minimise the code size, but I'm also curious what this leaves out. Are these the relevant sources? https://github.com/bebbo/libnix/tree...ources/startup -nostartfiles only seems to drop a few hundred bytes though and I guess I can live with that. Do -nostartfiles and -nostdlib interact? Does -nostdlib imply -nostartfiles? edit: found the manual for these flags https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html Are -flto and/or -fwhole-program supported? I was experimenting with my own vasm startup code and got "undefined reference to 'SysBase'" when linking with -flto, but it linked sucessfully without that flag. edit: resolved the error, I was actually using -flto and -fwhole-program together which is not correct, but the question stands. With -fbaserel, are messages like this errors or warnings? "reloc for _state_game_copper0 is out of range: 00000000" state_game_copper0 is an XDEF label in a vasm .obj and ideally in a separate section (but see next question!) - do I need to declare "state_game_copper0" as __far in the C code? Is it possible to have a .obj file assembled by vasm produce an Amiga HUNKF_CHIP hunk? I see the amiga.x linker script has "datachip" and "bsschip" sections - are these special names recognised by your ld? Though ld seems to use amiga_bss.x instead anyway which lacks these sections. Thanks Last edited by girv; 14 February 2022 at 14:53. |
14 February 2022, 22:46 | #1339 | |||||||
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Quote:
The default is newlib, which I wouldn't use, it's a place holder for ixemul in the far future And there -mcrt=clib2, which I also don't use. Quote:
Quote:
Quote:
Quote:
Quote:
Last edited by bebbo; 15 February 2022 at 06:45. |
|||||||
03 March 2022, 15:10 | #1340 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
random info...:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New GCC based dev toolchain for AmigaOS 3.x | cla | Coders. Releases | 8 | 24 December 2017 10:18 |
Issue with photon/xxxx WinUAE Toolchain | arpz | Coders. Asm / Hardware | 2 | 26 September 2015 22:33 |
New 68k gcc toolchain | arti | Coders. C/C++ | 17 | 31 July 2015 03:59 |
Hannibal's WinUAE Demo Toolchain 5 | Bobic | Amiga scene | 1 | 23 July 2015 21:04 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
|
|