You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6006 Reporter: wime Assigned to: meurer Status: closed (set by @xavierleroy on 2015-12-11T18:18:52Z) Resolution: fixed Priority: normal Severity: major Version: 4.00.1 Fixed in version: 4.00.2+dev Category: back end (clambda to assembly) Duplicate of:#5910 Monitored by:@gasche
Bug description
When I tried to compile ocamlnet on a Pandaboard the compiler failed with the messages
...
/tmp/camlasm0de67d.s: Assembler messages:
/tmp/camlasm0de67d.s:9339: Error: shift expression is too large -- mov r0,r1,lsl#32' /tmp/camlasm0de67d.s:9431: Error: shift expression is too large -- mov r4,r5,lsl#32'
File "netmech_scram.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasm0de67d.s
make[1]: *** [netmech_scram.cmx] Fehler 2
make: *** [opt] Fehler 2
Steps to reproduce
The following simplified code produces a similar error if you "ocamlopt" it. ocamlc works fine.
let x = (Random.int 255) in print_int (x mod 1);
Additional information
Currently "x mod 1" results in an left bit shift of 32 bits (lsl#32), which is not allowed on ARM. I was able to circumvent this problem by applying the attached patch, which limits the shift width to 31 bits and handles 32 bits in a separate case. It might need some refinement.
Original bug ID: 6006
Reporter: wime
Assigned to: meurer
Status: closed (set by @xavierleroy on 2015-12-11T18:18:52Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.00.1
Fixed in version: 4.00.2+dev
Category: back end (clambda to assembly)
Duplicate of: #5910
Monitored by: @gasche
Bug description
When I tried to compile ocamlnet on a Pandaboard the compiler failed with the messages
...
/tmp/camlasm0de67d.s: Assembler messages:
/tmp/camlasm0de67d.s:9339: Error: shift expression is too large --
mov r0,r1,lsl#32' /tmp/camlasm0de67d.s:9431: Error: shift expression is too large --
mov r4,r5,lsl#32'File "netmech_scram.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasm0de67d.s
make[1]: *** [netmech_scram.cmx] Fehler 2
make: *** [opt] Fehler 2
Steps to reproduce
The following simplified code produces a similar error if you "ocamlopt" it. ocamlc works fine.
let x = (Random.int 255) in print_int (x mod 1);
Additional information
Currently "x mod 1" results in an left bit shift of 32 bits (lsl#32), which is not allowed on ARM. I was able to circumvent this problem by applying the attached patch, which limits the shift width to 31 bits and handles 32 bits in a separate case. It might need some refinement.
File attachments
The text was updated successfully, but these errors were encountered: