Improving codegen for ARM Cortex-M

Mike Franklin slavo5150 at yahoo.com
Fri Jul 20 12:59:47 UTC 2018


On Friday, 20 July 2018 at 12:49:59 UTC, Mike Franklin wrote:

> GDC
> ---
> arm-none-eabi-gdc -c -O2 -nophoboslib -nostdinc -nodefaultlibs 
> -nostdlib -mthumb -mcpu=cortex-m4 -mtune=cortex-m4 
> -mfloat-abi=hard -Isource/runtime -fno-bounds-check 
> -ffunction-sections -fdata-sections -fno-weak
>
> _D5board3lcd8fillRectFiikktZv:
> 	.fnstart
> .LFB4:
> 	@ args = 4, pretend = 0, frame = 0
> 	@ frame_needed = 0, uses_anonymous_args = 0
> 	@ link register save eliminated.
> 	push	{r4, r5, r6}
> 	add	r3, r3, r1
> 	cmp	r1, r3
> 	ldrh	r5, [sp, #12]
> 	bgt	.L47
> 	rsb	r4, r1, r1, lsl #4
> 	add	r0, r0, r4, lsl #4
> 	ldr	r4, .L58
> 	add	r0, r0, r2
> 	rsb	r6, r2, r2, lsl #31
> 	add	r4, r4, r0, lsl #1
> 	lsls	r6, r6, #1
> .L51:
> 	cbz	r2, .L49
> 	adds	r0, r4, r6
> .L50:
> 	strh	r5, [r0], #2	@ movhi
> 	cmp	r0, r4
> 	bne	.L50
> .L49:
> 	adds	r1, r1, #1
> 	cmp	r3, r1
> 	add	r4, r4, #480
> 	bge	.L51
> .L47:
> 	pop	{r4, r5, r6}
> 	bx	lr

Gah.  Sorry folks.  I keep screwing up.  I can see above that 
`fillSpan` function is not being inlined.  I must be doing 
something wrong.

Please ignore this thread.

Sorry,
Mike



More information about the D.gnu mailing list