[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

FPC does SIGILL in armv4t



Hi,

Current fp-compiler package (version 2.4.0-1 for armel) gives SIGILL on
armv4t (arm920t), see:

~$ head -1 /proc/cpuinfo
Processor       : ARM920T rev 0 (v4l)
~$ gdb /usr/bin/fpc
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/fpc...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/fpc 

Program received signal SIGILL, Illegal instruction.
0x0000d438 in ?? ()
(gdb) disassemble $pc-16 $pc+32
Dump of assembler code from 0xd428 to 0xd458:
0x0000d428:     mov     r0, #1
0x0000d42c:     ldr     r1, [pc, #64]   ; 0xd474
0x0000d430:     strb    r0, [r1]
0x0000d434:     bic     r0, sp, #7
0x0000d438:     ldrd    r0, [r0]
0x0000d43c:     mov     r0, #0
0x0000d440:     ldr     r1, [pc, #44]   ; 0xd474
0x0000d444:     strb    r0, [r1]
0x0000d448:     ldr     r0, [pc, #32]   ; 0xd470
0x0000d44c:     ldrb    r0, [r0]
0x0000d450:     cmp     r0, #0
0x0000d454:     ldrne   r0, [pc, #28]   ; 0xd478
End of assembler dump.
-----------------------------------------------------------------------

This is from the file "fpcsrc/rtl/arm/arm.inc", at line 589:

-----------------------------------------------------------------------
procedure fpc_cpucodeinit;
begin
{$ifdef FPC_SYSTEM_FPC_MOVE}
  cpu_has_edsp:=true;
  in_edsp_test:=true;
  asm
    bic r0,sp,#7
    ldrd r0,[r0]
  end;
  in_edsp_test:=false;
  if cpu_has_edsp then
    moveproc:=@move_pld
  else
    moveproc:=@move_blended;
{$endif FPC_SYSTEM_FPC_MOVE}
end;
-----------------------------------------------------------------------

I don't know enough ARM assembler to guess what this is trying to do, or
how to replace the "ldrd" instruction for armv4 compatibility.

    Daniel.


Reply to: