Page 1 of 2

It's ASM CODING TIME!!!

PostPosted: Jun 22, 2002 @ 5:56pm
by R0B

PostPosted: Jun 22, 2002 @ 6:31pm
by fused

PostPosted: Jun 23, 2002 @ 4:19am
by Robotbeat

PostPosted: Jun 24, 2002 @ 10:06am
by refractor
Note: I'd stand much more of a chance of helping if somebody would PLEASE fix the damn code tags to use SPAN and not DIVs. Reading code at one symbol per line is pretty useless. :(


fused:

It doesn't have /large/ issues with pipeline stalls, but your code there does seem to use the same target and destinations registers all over the place.

In general:
don't use the result of an instruction in the next instruction
(or maybe the next two - look at the StrongARM datasheet - the result cycle counts are in there) - you're stalling the pipeline all over the place. For the same reason, don't use a target register as an address register (it might be alright, actually, but it's still not nice):
LDR R0,[R0]

DO use the conditional execution - "skipped" instructions will lose you only one cycle, IIRC, no matter what they are. Having said that, branches on the StrongARM are pretty fast.


ROB:
ARMv4s have a 32x32 bit multiply /instruction/. UMULL. If only you could embed assembler in eVC++, eh.

PostPosted: Jun 24, 2002 @ 2:33pm
by Jadam

PostPosted: Jun 24, 2002 @ 9:26pm
by fused

PostPosted: Jun 24, 2002 @ 10:14pm
by refractor
Not for ARM, no. Only full functions only can be linked in.

You can't inline ARM assembler within a C function, for example, but you can compile the entire function from an assembler (or compile a C function to ARM and tweak the assembler source and keep it as assembler).

PostPosted: Jun 26, 2002 @ 7:57am
by Jadam

PostPosted: Jun 26, 2002 @ 2:30pm
by angedelamort

PostPosted: Jun 26, 2002 @ 4:08pm
by R0B

PostPosted: Jun 26, 2002 @ 4:11pm
by Robotbeat

PostPosted: Jun 26, 2002 @ 9:48pm
by James S
Oooh, ooh! I'm good at math! I'm good at math! I can help too!

PostPosted: Jun 26, 2002 @ 10:08pm
by refractor

PostPosted: Jun 27, 2002 @ 9:20pm
by Guest

PostPosted: Jun 27, 2002 @ 10:09pm
by Robotbeat