A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Demos / GCC 10
 Page:  ««  1  2  
Author Message
Jamie2021
Member
#1 - Posted: 26 May 2023 17:21
Reply Quote
The copy past removed some characters, second try
move.l %0,a0nt
move.l %0,a1nt
move.l %0,a2nt
rloaderror
Member
#2 - Posted: 29 May 2023 05:36
Reply Quote
Thanks! That looks more tidy than what I've found so far.

I wondered why the AmigaOS includes were not throwing similar errors on the lack of having convenient __register type keywords in the prototypes. Then I found that finally the register calls get translated to something like the below in inline/macros.h :


#define LP1FP(offs, rt, name, t1, v1, r1, bt, bn, fpt)
({
typedef fpt;
t1 _##name##_v1 = (v1);
rt _##name##_re2 =
({
register volatile int _d1 __asm("d1");
register volatile int _a0 __asm("a0");
register volatile int _a1 __asm("a1");
register rt _##name##_re __asm("d0");
register volatile void *const _##name##_bn __asm("a6") = (bn);
register volatile t1 _n1 __asm(#r1) = _##name##_v1;
__asm volatile ("jsr %%a6@(-"#offs":W)"
: "=r" (_##name##_re), "=r" (_d1), "=r" (_a0), "=r" (_a1)
: "r" (_##name##_bn), "rf"(_n1)
: "fp0", "fp1", "cc", "memory");
_##name##_re;
});
_##name##_re2;
})


So it looks like this is the "timeless" way to pass arguments to an assembly function through registers. I've converted most calls to use stack now as the majority were not time critical. For the remaining ones where the register passing might play an important role I'll use the more verbose style. Hopefully it will last :)
rloaderror
Member
#3 - Posted: 8 Jun 2023 12:58
Reply Quote
Now things are building and linking with gcc12.2 however I have disabled these optimizations from O2 and O3.


# Causes link error
#O2OPTS += -freorder-blocks-and-partition -freorder-functions

# Hang
# O2OPTS += -fcaller-saves
# O3OPTS += -ftree-loop-distribution

# Crash
# O2OPTS += -falign-functions
# O2OPTS += -falign-jumps


Also I have to link with vlink instead of gcc to avoid crash.
rloaderror
Member
#4 - Posted: 18 Jul 2023 19:29 - Edited
Reply Quote
Finally I didn't get any perceptible performance increase from using gcc12 over gcc6. However it was a nice learning experience to do this transition. The exe got a little lighter from dropping stdlib. The idea of creating a 64K with the same codebase as the demo system seems more feasible now.
kas1e
Member
#5 - Posted: 22 Jul 2023 10:17
Reply Quote
@all
sorry for interrupt technical discussion

@rloaderror
sorry for bother, but do you have any working contact where i can reach you for few question about your music ? i tried ones find in file.diz of 10-15 years old demos, but they died long ago seems so
rloaderror
Member
#6 - Posted: 30 Jul 2023 13:51
Reply Quote
@kas1e : try send mail to "loaderror ętt sina,com" .
kas1e
Member
#7 - Posted: 5 Aug 2023 06:15
Reply Quote
@rloaderror: tried from 3 different mailboxes, but seems they all not reach you. I wrote you PM on bitfellas, check this out plz :) thanks!
rloaderror
Member
#8 - Posted: 13 Aug 2023 21:41
Reply Quote
@kas1e: All made it through, just my slow reply :)

Would be interesting to know if anyone got a good performance gain through using gcc-12 vs earlier gcc.

Looks like Bartman's gcc is progressing towards gcc13 as well based on recent commits. Good stuff!
 Page:  ««  1  2  

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0