On Fri, Nov 15, 2019 at 01:16:55AM +0000, Stuart Henderson wrote:
> I think if you run "disassemble" from gdb (or pkg_add gdb and run "egdb"
> in case the old gdb in base doesn't understand the opcodes) you may find
> which instruction it's complaining about.
> 
> This runs OK on an i386 with more CPU features; most likely it wants
> SSE or similar which the Geode LX in your net5501 doesn't have. (Go has
> runtime cpuid checks for most of the SSE variants but I think not for
> the original SSE which it probably just assumes is available).
> One clue would be if the disassembly has instructions referencing
> registers X0..X15 which are just used for SSE.
> 
> > cpu0 at mainbus0: (uniprocessor)
> > cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 
> > 500 MHz, 05-0a-02
> > cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW

egdb seems to work a little better:

(gdb) run
Starting program: /usr/local/bin/go 

Program received signal SIGILL, Illegal instruction.
runtime.check () at /usr/local/go/src/runtime/runtime1.go:146
146                     i, i1 float32
(gdb) bt
#0  runtime.check () at /usr/local/go/src/runtime/runtime1.go:146
#1  0x0809794e in runtime.rt0_go () at /usr/local/go/src/runtime/asm_387.s:238
#2  0x0896c360 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


It has been a *long* time since I've looked at assembly - I *think* this
is failing on xorps, which is an SSE instruction?

(gdb) disassemble
Dump of assembler code for function runtime.check:
   0x0807f9f0 <+0>:     mov    %gs:0xfffffffc,%ecx
   0x0807f9f7 <+7>:     cmp    0x8(%ecx),%esp
   0x0807f9fa <+10>:    jbe    0x807fd6b <runtime.check+891>
   0x0807fa00 <+16>:    sub    $0x2c,%esp
   0x0807fa03 <+19>:    movl   $0x0,0x20(%esp)
=> 0x0807fa0b <+27>:    xorps  %xmm0,%xmm0
   0x0807fa0e <+30>:    movss  %xmm0,0x1c(%esp)
   0x0807fa14 <+36>:    xorps  %xmm0,%xmm0
   0x0807fa17 <+39>:    movsd  %xmm0,0x24(%esp)
   0x0807fa1d <+45>:    movl   $0x0,0x18(%esp)
   0x0807fa25 <+53>:    movl   $0x4b57ce31,(%esp)
   0x0807fa2c <+60>:    movl   $0xb3a,0x4(%esp)
   0x0807fa34 <+68>:    movl   $0x3b9aca00,0x8(%esp)
   0x0807fa3c <+76>:    lea    0x20(%esp),%eax
   0x0807fa40 <+80>:    mov    %eax,0xc(%esp)
   0x0807fa44 <+84>:    call   0x80801b0 <runtime.timediv>
   0x0807fa49 <+89>:    cmpl   $0x3039,0x10(%esp)
   0x0807fa51 <+97>:    jne    0x807fd54 <runtime.check+868>
   0x0807fa57 <+103>:   cmpl   $0xd431,0x20(%esp)
   0x0807fa5f <+111>:   jne    0x807fd54 <runtime.check+868>
   0x0807fa65 <+117>:   movl   $0x0,0x14(%esp)
   0x0807fa6d <+125>:   movl   $0x1,0x14(%esp)
   0x0807fa75 <+133>:   lea    0x14(%esp),%eax
   0x0807fa79 <+137>:   mov    %eax,(%esp)
   0x0807fa7c <+140>:   movl   $0x1,0x4(%esp)
   0x0807fa84 <+148>:   movl   $0x2,0x8(%esp)
   0x0807fa8c <+156>:   call   0x804a660 <runtime/internal/atomic.Cas>
   0x0807fa91 <+161>:   movzbl 0xc(%esp),%eax
   0x0807fa96 <+166>:   test   %al,%al
   0x0807fa98 <+168>:   je     0x807fd3e <runtime.check+846>
   0x0807fa9e <+174>:   cmpl   $0x2,0x14(%esp)
   0x0807faa3 <+179>:   jne    0x807fd28 <runtime.check+824>
   0x0807faa9 <+185>:   movl   $0x4,0x14(%esp)
   0x0807fab1 <+193>:   lea    0x14(%esp),%eax
   0x0807fab5 <+197>:   mov    %eax,(%esp)
   0x0807fab8 <+200>:   movl   $0x5,0x4(%esp)
   0x0807fac0 <+208>:   movl   $0x6,0x8(%esp)
   0x0807fac8 <+216>:   call   0x804a660 <runtime/internal/atomic.Cas>
   0x0807facd <+221>:   movzbl 0xc(%esp),%eax
   0x0807fad2 <+226>:   test   %al,%al
   0x0807fad4 <+228>:   jne    0x807fd12 <runtime.check+802>
   0x0807fada <+234>:   cmpl   $0x4,0x14(%esp)
   0x0807fadf <+239>:   jne    0x807fcfc <runtime.check+780>
   0x0807fae5 <+245>:   movl   $0xffffffff,0x14(%esp)
   0x0807faed <+253>:   lea    0x14(%esp),%eax
   0x0807faf1 <+257>:   mov    %eax,(%esp)
   0x0807faf4 <+260>:   movl   $0xffffffff,0x4(%esp)
   0x0807fafc <+268>:   movl   $0xfffffffe,0x8(%esp)
   0x0807fb04 <+276>:   call   0x804a660 <runtime/internal/atomic.Cas>
   0x0807fb09 <+281>:   movzbl 0xc(%esp),%eax
   0x0807fb0e <+286>:   test   %al,%al
   0x0807fb10 <+288>:   je     0x807fce6 <runtime.check+758>
   0x0807fb16 <+294>:   cmpl   $0xfffffffe,0x14(%esp)
   0x0807fb1b <+299>:   jne    0x807fcd0 <runtime.check+736>
   0x0807fb21 <+305>:   movl   $0x0,0x18(%esp)
   0x0807fb29 <+313>:   movl   $0x1010101,0x18(%esp)
   0x0807fb31 <+321>:   lea    0x19(%esp),%eax
   0x0807fb35 <+325>:   mov    %eax,(%esp)
   0x0807fb38 <+328>:   movb   $0xf0,0x4(%esp)
   0x0807fb3d <+333>:   call   0x804a880 <runtime/internal/atomic.Or8>
   0x0807fb42 <+338>:   cmpb   $0x1,0x18(%esp)
   0x0807fb47 <+343>:   jne    0x807fcba <runtime.check+714>
   0x0807fb4d <+349>:   cmpb   $0xf1,0x19(%esp)
   0x0807fb52 <+354>:   jne    0x807fcba <runtime.check+714>
   0x0807fb58 <+360>:   cmpb   $0x1,0x1a(%esp)
   0x0807fb5d <+365>:   jne    0x807fcba <runtime.check+714>
   0x0807fb63 <+371>:   cmpb   $0x1,0x1b(%esp)
   0x0807fb68 <+376>:   jne    0x807fcba <runtime.check+714>
   0x0807fb6e <+382>:   movl   $0x0,0x18(%esp)
   0x0807fb76 <+390>:   movl   $0xffffffff,0x18(%esp)
   0x0807fb7e <+398>:   lea    0x19(%esp),%eax
   0x0807fb82 <+402>:   mov    %eax,(%esp)
   0x0807fb85 <+405>:   movb   $0x1,0x4(%esp)
   0x0807fb8a <+410>:   call   0x804a890 <runtime/internal/atomic.And8>
   0x0807fb8f <+415>:   cmpb   $0xff,0x18(%esp)
   0x0807fb94 <+420>:   jne    0x807fca4 <runtime.check+692>
   0x0807fb9a <+426>:   cmpb   $0x1,0x19(%esp)
   0x0807fb9f <+431>:   jne    0x807fca4 <runtime.check+692>
   0x0807fba5 <+437>:   cmpb   $0xff,0x1a(%esp)
   0x0807fbaa <+442>:   jne    0x807fca4 <runtime.check+692>
   0x0807fbb0 <+448>:   cmpb   $0xff,0x1b(%esp)
   0x0807fbb5 <+453>:   jne    0x807fca4 <runtime.check+692>
   0x0807fbbb <+459>:   movl   $0xffffffff,0x24(%esp)
   0x0807fbc3 <+467>:   movl   $0xffffffff,0x28(%esp)
   0x0807fbcb <+475>:   movsd  0x24(%esp),%xmm0
   0x0807fbd1 <+481>:   movsd  0x8645a18,%xmm1
   0x0807fbd9 <+489>:   ucomisd %xmm1,%xmm0
   0x0807fbdd <+493>:   jne    0x807fbe5 <runtime.check+501>
   0x0807fbdf <+495>:   jnp    0x807fc8e <runtime.check+670>
   0x0807fbe5 <+501>:   jne    0x807fbed <runtime.check+509>
   0x0807fbe7 <+503>:   jnp    0x807fc78 <runtime.check+648>
   0x0807fbed <+509>:   movl   $0xffffffff,0x1c(%esp)
   0x0807fbf5 <+517>:   movss  0x1c(%esp),%xmm0
   0x0807fbfb <+523>:   movss  0x8645628,%xmm1
   0x0807fc03 <+531>:   ucomiss %xmm0,%xmm1
   0x0807fc06 <+534>:   jne    0x807fc0a <runtime.check+538>
   0x0807fc08 <+536>:   jnp    0x807fc62 <runtime.check+626>
   0x0807fc0a <+538>:   call   0x807f6a0 <runtime.testAtomic64>
   0x0807fc0f <+543>:   movl   $0x800,(%esp)
   0x0807fc16 <+550>:   call   0x80878c0 <runtime.round2>
   0x0807fc1b <+555>:   cmpl   $0x800,0x4(%esp)
   0x0807fc23 <+563>:   jne    0x807fc4c <runtime.check+604>
   0x0807fc25 <+565>:   call   0x8099260 <runtime.checkASM>
   0x0807fc2a <+570>:   movzbl (%esp),%eax
   0x0807fc2e <+574>:   test   %al,%al
   0x0807fc30 <+576>:   je     0x807fc36 <runtime.check+582>
   0x0807fc32 <+578>:   add    $0x2c,%esp
   0x0807fc35 <+581>:   ret    
   0x0807fc36 <+582>:   lea    0x8571904,%eax
   0x0807fc3c <+588>:   mov    %eax,(%esp)
   0x0807fc3f <+591>:   movl   $0x16,0x4(%esp)
   0x0807fc47 <+599>:   call   0x8072260 <runtime.throw>
   0x0807fc4c <+604>:   lea    0x8575ba6,%eax
   0x0807fc52 <+610>:   mov    %eax,(%esp)
   0x0807fc55 <+613>:   movl   $0x1c,0x4(%esp)
   0x0807fc5d <+621>:   call   0x8072260 <runtime.throw>
   0x0807fc62 <+626>:   lea    0x856a764,%eax
   0x0807fc68 <+632>:   mov    %eax,(%esp)
   0x0807fc6b <+635>:   movl   $0xb,0x4(%esp)
   0x0807fc73 <+643>:   call   0x8072260 <runtime.throw>
   0x0807fc78 <+648>:   lea    0x856a77a,%eax
   0x0807fc7e <+654>:   mov    %eax,(%esp)
   0x0807fc81 <+657>:   movl   $0xb,0x4(%esp)
   0x0807fc89 <+665>:   call   0x8072260 <runtime.throw>
   0x0807fc8e <+670>:   lea    0x856a76f,%eax
   0x0807fc94 <+676>:   mov    %eax,(%esp)
   0x0807fc97 <+679>:   movl   $0xb,0x4(%esp)
   0x0807fc9f <+687>:   call   0x8072260 <runtime.throw>
   0x0807fca4 <+692>:   lea    0x8569c24,%eax
   0x0807fcaa <+698>:   mov    %eax,(%esp)
   0x0807fcad <+701>:   movl   $0xa,0x4(%esp)
   0x0807fcb5 <+709>:   call   0x8072260 <runtime.throw>
   0x0807fcba <+714>:   lea    0x85690f5,%eax
   0x0807fcc0 <+720>:   mov    %eax,(%esp)
   0x0807fcc3 <+723>:   movl   $0x9,0x4(%esp)
   0x0807fccb <+731>:   call   0x8072260 <runtime.throw>
   0x0807fcd0 <+736>:   lea    0x8566551,%eax
   0x0807fcd6 <+742>:   mov    %eax,(%esp)
   0x0807fcd9 <+745>:   movl   $0x4,0x4(%esp)
   0x0807fce1 <+753>:   call   0x8072260 <runtime.throw>
   0x0807fce6 <+758>:   lea    0x856654d,%eax
   0x0807fcec <+764>:   mov    %eax,(%esp)
   0x0807fcef <+767>:   movl   $0x4,0x4(%esp)
   0x0807fcf7 <+775>:   call   0x8072260 <runtime.throw>
   0x0807fcfc <+780>:   lea    0x8566549,%eax
   0x0807fd02 <+786>:   mov    %eax,(%esp)
   0x0807fd05 <+789>:   movl   $0x4,0x4(%esp)
   0x0807fd0d <+797>:   call   0x8072260 <runtime.throw>
   0x0807fd12 <+802>:   lea    0x8566545,%eax
   0x0807fd18 <+808>:   mov    %eax,(%esp)
   0x0807fd1b <+811>:   movl   $0x4,0x4(%esp)
   0x0807fd23 <+819>:   call   0x8072260 <runtime.throw>
   0x0807fd28 <+824>:   lea    0x8566541,%eax
   0x0807fd2e <+830>:   mov    %eax,(%esp)
   0x0807fd31 <+833>:   movl   $0x4,0x4(%esp)
   0x0807fd39 <+841>:   call   0x8072260 <runtime.throw>
   0x0807fd3e <+846>:   lea    0x856653d,%eax
   0x0807fd44 <+852>:   mov    %eax,(%esp)
   0x0807fd47 <+855>:   movl   $0x4,0x4(%esp)
   0x0807fd4f <+863>:   call   0x8072260 <runtime.throw>
   0x0807fd54 <+868>:   lea    0x856a651,%eax
   0x0807fd5a <+874>:   mov    %eax,(%esp)
   0x0807fd5d <+877>:   movl   $0xb,0x4(%esp)
   0x0807fd65 <+885>:   call   0x8072260 <runtime.throw>
   0x0807fd6a <+890>:   nop
   0x0807fd6b <+891>:   call   0x8097b40 <runtime.morestack_noctxt>
   0x0807fd70 <+896>:   jmp    0x807f9f0 <runtime.check>
End of assembler dump.


Thanks for helping out with this!

Reply via email to