View Single Post
Old 19 January 2017, 23:37   #28
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by alkis View Post
Are you taking a stand that C compilers are flawed in the amiga?
The code generation is flawed in comparison to what modern compilers are capable of.

Quote:
Originally Posted by alkis View Post
Or...what code does your favorite amiga c compiler produces???
Vbcc uses assembler inlines by default giving the following code for strcpy().

Code:
   move.l a0,d0
.l1:
   move.b (a1)+,(a0)+
   bne .l1
Beautiful! Perfect! Short sweet and inlined. However, if you compile the C code above you get the following.

Code:
strcpy:
   movem.l a2-a3,-(sp)
   movea.l ($10,sp),a3
   movea.l ($c,sp),a2
   move.l a2,d0
   movea.l a3,a1
   addq.l #1,a3
   movea.l a2,a0
   addq.l #1,a2
   move.b (a1),(a0)
   beq.b .l2
.l1:
   movea.l a3,a1
   addq.l #1,a3
   movea.l a2,a0
   addq.l #1,a2
   move.b (a1),(a0)
   bne.b .l1
.l2:
   movem.l (sp)+,a2-a3
   rts
Doh! Epic fail! Dr. Barthelmann and his vbcc compiler are capable of more but realistically, as I told Frank Wille, it is not going to happen without support for the 68k and Amiga. Who wants to waste time on a dead platform for a handful of people?
matthey is offline  
 
Page generated in 0.05122 seconds with 11 queries