Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-01

Trunk does not compile for armv6m since rev. 26346

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Ring

Checkin Comment was:

Optimized support for 32x32 => 64bit multiplications on ARM

This code uses UMULL and SMULL to perform the multiplications, which take two 32bit source registers and two 32bit destination registers.

... umull is not supported by cortex-m0 chips ...

system.inc(1770,8) Warning: Implicit string type conversion from "RawByteString" to "UnicodeString" /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s: Assembler messages: /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:3564: Error: selected processor does not support Thumb mode `umull r0,r1,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:3570: Error: selected processor does not support Thumb mode `umull r0,r1,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:3576: Error: selected processor does not support Thumb mode `umull r1,r0,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:3582: Error: selected processor does not support Thumb mode `umull r0,r1,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:44407: Error: selected processor does not support Thumb mode `umull r0,r2,r1,r0' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:44417: Error: selected processor does not support Thumb mode `umull r0,r2,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:44427: Error: selected processor does not support Thumb mode `umull r1,r0,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:44435: Error: selected processor does not support Thumb mode `umull r0,r2,r0,r1' /Users/ring/devel/fpc/rtl/units/arm-embedded/system.s:44582: Error: selected processor does not support Thumb mode `umull r0,r1,r1,r0' system.pp(257) Error: Error while assembling exitcode 1 system.pp(257) Fatal: There were 2 errors compiling module, stopping F

Reply by email

Nico Erfurth
to Michael Ring
Michael Ring wrote 9 lines
Checkin Comment was: Optimized support for 32x32 => 64bit multiplications on ARM This code uses UMULL and SMULL to perform the multiplications, which take two 32bit source registers and two 32bit destination registers. ... umull is not supported by cortex-m0 chips ...

Sorry, I've forget to add that check, will checkin a fix in the next 30 minutes.

Nico

Reply by email

Nico Erfurth
to Nico Erfurth
Nico Erfurth wrote 13 lines
On 02.01.14 12:51, Michael Ring wrote: > Checkin Comment was: > > Optimized support for 32x32 => 64bit multiplications on ARM > > This code uses UMULL and SMULL to perform the multiplications, which > take two 32bit source registers and two 32bit destination registers. > > > ... umull is not supported by cortex-m0 chips ... Sorry, I've forget to add that check, will checkin a fix in the next 30 minutes.

Should be fixed by r26354. Could you please test it for cortex-m0 devices?

I've added a new CPU-feature flag CPUARM_HAS_UMULL and also used it for the 64x64=>64bit code.

Nico

Reply by email

Jonas Maebe
to Nico Erfurth
Nico Erfurth wrote
I've added a new CPU-feature flag CPUARM_HAS_UMULL and also used it for the 64x64=>64bit code.

I think it would be cleaner to also use it in
tarmaddnode.use_generic_mul32to64 (maybe it's also necessary for correctness, since in pass_1 you check is_64bitint(left.resultdef) in tarmaddnode.pass_1 and that will return false if use_generic_mul32to64 returned true, which it currently always does).

Jonas

Reply by email

Michael Ring
to Jonas Maebe

I tried rev. 26354, the problem is not yet fixed, perhaps Jonas is right and there's more to do... I both tried armv7m and armv6m, both break:

ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -O- -gw2 -Fi../objpas/sysutils sysutils.pp
dati.inc(80,34) Fatal: Internal error 2002090902
Fatal: Compilation aborted

this is my commandline for building:

SUBARCH=armv7m
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-O- -gw2" BINUTILSPREFIX=arm-none-eabi- || exit 1

Jonas Maebe wrote 18 lines
On 02 Jan 2014, at 14:11, Nico Erfurth wrote: > I've added a new CPU-feature flag CPUARM_HAS_UMULL and also used it for > the 64x64=>64bit code. I think it would be cleaner to also use it in tarmaddnode.use_generic_mul32to64 (maybe it's also necessary for correctness, since in pass_1 you check is_64bitint(left.resultdef) in tarmaddnode.pass_1 and that will return false if use_generic_mul32to64 returned true, which it currently always does). Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Florian Klämpfl
to Michael Ring
Michael Ring wrote 6 lines
I tried rev. 26354, the problem is not yet fixed, perhaps Jonas is right and there's more to do... I both tried armv7m and armv6m, both break: ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -O- -gw2 -Fi../objpas/sysutils sysutils.pp dati.inc(80,34) Fatal: Internal error 2002090902

Should work again.

Reply by email

Michael Ring
to Florian Klämpfl

Working again for armv7m and armv6m, thank you!

Michael

Florian Klämpfl wrote 13 lines
Am 02.01.2014 15:18, schrieb Michael Ring: > I tried rev. 26354, the problem is not yet fixed, perhaps Jonas is right > and there's more to do... I both tried armv7m and armv6m, both break: > > ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -O- -gw2 > -Fi../objpas/sysutils sysutils.pp > dati.inc(80,34) Fatal: Internal error 2002090902 Should work again. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Nico Erfurth
to Jonas Maebe: I think it would be cleaner to also use it in tarmaddnode.use_generic_mul32to64 (maybe…
Jonas Maebe wrote 11 lines
On 02 Jan 2014, at 14:11, Nico Erfurth wrote: > I've added a new CPU-feature flag CPUARM_HAS_UMULL and also used it for > the 64x64=>64bit code. I think it would be cleaner to also use it in tarmaddnode.use_generic_mul32to64 (maybe it's also necessary for correctness, since in pass_1 you check is_64bitint(left.resultdef) in tarmaddnode.pass_1 and that will return false if use_generic_mul32to64 returned true, which it currently always does).

You're right and Florian already fixed it. I'll have to work on my arm testsetup for the different architectures and ISAs to catch stuff like this BEFORE i'm committing. ;)

Nico

Reply by email