Re: [fpc-devel] Can't compile 32 bit trunk on Mac OSX

2020-08-14 Thread Jonas Maebe
On 14/08/2020 11:39, C Western wrote:
> I am not able to compile the current trunk for 32 bits on Mac OS High
> Sierra - some details below. (The 64 bit version compiles and runs
> fine.) Is this a specific issue with my setup, or something more general?

Seems like a peephole optimisation that doesn't understand symbol
differences:

# [3827] list.insertbefore(tai_comment.Create(strpnew('path:
'+infile.path)), hp);
leal-288(%ebp),%eax
callLfpc_ansistr_decr_ref$stub
movw$0,(%esp)
movl-1108(%ebp),%eax
movl4(%eax),%ecx
movl-1060(%ebp),%edx
>>  leal_$$fpclocal$_ld66-Lj892+12(%edx),%eax
>>  movl%eax,%edx


->

# [3827] list.insertbefore(tai_comment.Create(strpnew('path:
'+infile.path)), hp);
leal-288(%ebp),%eax
callLfpc_ansistr_decr_ref$stub
movw$0,(%esp)
movl-1108(%ebp),%eax
movl4(%eax),%ecx
movl-1060(%ebp),%edx
# Peephole Optimization: LeaMov2Lea done
# Peephole Optimization: Lea2Add done
>>  addl$12,%edx



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Can't compile 32 bit trunk on Mac OSX

2020-08-14 Thread C Western
I am not able to compile the current trunk for 32 bits on Mac OS High 
Sierra - some details below. (The 64 bit version compiles and runs 
fine.) Is this a specific issue with my setup, or something more general?


Colin

...

/bin/rm -f i386/ppc386 i386/ppc68k i386/ppcppc i386/ppcsparc i386/ppcarm 
i386/ppcarmeb i386/ppcx64 i386/ppcppc64 i386/ppcmips i386/ppcmipsel 
i386/ppcavr i386/ppcjvm i386/ppc8086 i386/ppca64 i386/ppcsparc64 
i386/ppcrv32 i386/ppcrv64 i386/ppcxtensa i386/ppcz80

/bin/rm -f ppc386
/Applications/Xcode.app/Contents/Developer/usr/bin/make compiler
/bin/mkdir -p i386/units/i386-darwin
/bin/mkdir -p i386/bin/i386-darwin
/Users/me/fpc/trunk/fpcsrc/compiler/ppc2 -Ur -Xs -O2 -n -Fui386 
-Fusystems -Fu/Users/me/fpc/trunk/fpcsrc/rtl/units/i386-darwin -Fii386 
-FEi386/bin/i386-darwin -FUi386/units/i386-darwin -dRELEASE 
-Fl/Users/me/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib 
-di386 -dGDB -dBROWSERLOG -Fux86 -Fix86 -Sew pp.pas

pp.pas(294,1) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $000744E3:
EAccessViolation: Access violation
  $000744E3
  $002C6158
  $00074A4F
  $000723C1
  $00323C85

make[6]: *** [ppc386] Error 217
make[5]: *** [next] Error 2
make[4]: *** [ppc3] Error 2
make[3]: *** [cycle] Error 2
make[2]: *** [compiler_cycle] Error 2
make[1]: *** [build-stamp.i386-darwin] Error 2
make: *** [fpcsrc/build-stamp.i386-darwin] Error 2


run -Ur -Xs -O2 -n -Fui386 -Fusystems 
-Fu/Users/me/fpc/trunk/fpcsrc/rtl/units/i386-darwin -Fii386 
-FEi386/bin/i386-darwin -FUi386/units/i386-darwin -dRELEASE 
-Fl/Users/me/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib 
-di386 -dGDB -dBROWSERLOG -Fux86 -Fix86 -Sew pp.pas

Process 7301 launched: '/Users/me/fpc/trunk/fpcsrc/compiler/ppc2' (i386)
Process 7301 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = 
EXC_BAD_ACCESS (code=2, address=0x77f000)
    frame #0: 0x0001f4e3 
ppc2`SYSTEM_$$_DEFAULTANSI2UNICODEMOVE$PCHAR$WORD$UNICODESTRING$LONGINT + 51

ppc2`SYSTEM_$$_DEFAULTANSI2UNICODEMOVE$PCHAR$WORD$UNICODESTRING$LONGINT:
->  0x1f4e3 <+51>: movzbw (%esi), %ax
    0x1f4e7 <+55>: movw   %ax, (%edx)
    0x1f4ea <+58>: addl   $0x1, %esi
    0x1f4ed <+61>: addl   $0x2, %edx
Target 0: (ppc2) stopped.

bt
* thread #1, queue = 'com.apple.main-thread', stop reason = 
EXC_BAD_ACCESS (code=2, address=0x77f000)
  * frame #0: 0x0001f4e3 
ppc2`SYSTEM_$$_DEFAULTANSI2UNICODEMOVE$PCHAR$WORD$UNICODESTRING$LONGINT + 51

    frame #1: 0x00271158 ppc2`___lldb_unnamed_symbol1270$$ppc2 + 424
    frame #2: 0x0001fa4f ppc2`fpc_ansistr_to_unicodestr + 111
    frame #3: 0x0001d24e ppc2`___lldb_unnamed_symbol102$$ppc2 + 110
    frame #4: 0x0001d3c1 ppc2`fpc_ansistr_concat + 257
    frame #5: 0x002cec85 
ppc2`T_DARWIN$_$TLINKERDARWIN_$__$$_WRITERESPONSEFILE$BOOLEAN$$BOOLEAN + 917
    frame #6: 0x002cf382 
ppc2`T_DARWIN$_$TLINKERDARWIN_$__$$_MAKEEXECUTABLE$$BOOLEAN + 930

    frame #7: 0x00263a93 ppc2`PMODULES_$$_PROC_PROGRAM$BOOLEAN + 7059
    frame #8: 0x00142583 ppc2`PARSER_$$_COMPILE$SHORTSTRING + 963
    frame #9: 0x0003b805 ppc2`COMPILER_$$_COMPILE$ANSISTRING$$LONGINT + 677
    frame #10: 0x000113d7 ppc2`PASCALMAIN + 55


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel