Article View: alt.lang.asm
Article #381Need help with Sparc Assembler
From: Steve Silberberg
Date: Mon, 02 Feb 1998 00:00
Date: Mon, 02 Feb 1998 00:00
60 lines
3381 bytes
3381 bytes
Hi there, I have a piece of compiled software from a company that is out of business. The code runs on a SunOS platform. I don't know what the registers or op codes of the machine are, but the program hangs, and I dissassembled the routine in which it hangs with gdb. Does anyone have any idea what this code for hmany (maybe, how many?) does? I think there's an infinite loop between 0x3358 and 0x338c, because the longer I let it run, the higher the value of register i4 becomes. But I really have no idea what's going on. Could a register be overflowing? I'm parsing through at 5MB file when a system read seems to fail. Anyway, here's the code, MANY thanks in advance. (gdb) disassemble 0x331c Dump of assembler code for function hmany: 0x331c <hmany>: save %sp, -72, %sp 0x3320 <hmany+4>: sethi %hi(0x6400), %o0 0x3324 <hmany+8>: ldd [ %o0 + 0x110 ], %f0 ! 0x6510 <dnum+24> 0x3328 <hmany+12>: std %f0, [ %fp + -8 ] 0x332c <hmany+16>: sethi %hi(0x6400), %o2 0x3330 <hmany+20>: ld [ %o2 + 0xec ], %i4 ! 0x64ec <ISNEG> 0x3334 <hmany+24>: add -8, %fp, %i5 0x3338 <hmany+28>: ld [ %i5 ], %f2 0x333c <hmany+32>: ld [ %i5 + 4 ], %f3 0x3340 <hmany+36>: sethi %hi(0x6400), %o3 0x3344 <hmany+40>: ldd [ %o3 + 0xf8 ], %f4 ! 0x64f8 <dnum> 0x3348 <hmany+44>: fcmped %f2, %f4 0x334c <hmany+48>: nop 0x3350 <hmany+52>: fbug 0x3394 <hmany+120> 0x3354 <hmany+56>: sethi %hi(0x6400), %o4 0x3358 <hmany+60>: ldd [ %o4 + 0x118 ], %f6 ! 0x6518 <dnum+32> 0x335c <hmany+64>: ld [ %i5 ], %f8 0x3360 <hmany+68>: ld [ %i5 + 4 ], %f9 0x3364 <hmany+72>: fmuld %f8, %f6, %f10 0x3368 <hmany+76>: sethi %hi(0x6400), %o3 0x336c <hmany+80>: inc %i4 0x3370 <hmany+84>: st %f10, [ %i5 ] 0x3374 <hmany+88>: st %f11, [ %i5 + 4 ] 0x3378 <hmany+92>: ld [ %i5 ], %f2 0x337c <hmany+96>: ld [ %i5 + 4 ], %f3 0x3380 <hmany+100>: ldd [ %o3 + 0xf8 ], %f4 0x3384 <hmany+104>: fcmped %f2, %f4 0x3388 <hmany+108>: nop 0x338c <hmany+112>: fble,a 0x3358 <hmany+60> 0x3390 <hmany+116>: sethi %hi(0x6400), %o4 0x3394 <hmany+120>: ret 0x3398 <hmany+124>: restore %g0, %i4, %o0 End of assembler dump. ---------------- Steve Silberberg mailto:stevebo@onramp.net Visit the Air Sickness Bag Museum at: http://rampages.onramp.net/~stevebo/airsick.html FACT: Buff Babes Dig Cut Dudes!
Technical Details
Message-ID:
<6b52s8$ff9$1@news.onramp.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,16d7807aa6571275,start X-Google-Attributes: gid11318c,public X-Google-Thread: 113606,16d7807aa6571275,start X-Google-Attributes: gid113606,public X-Google-Thread: f7d8d,16d7807aa6571275,start X-Google-Attributes: gidf7d8d,public X-Google-Thread: f6653,16d7807aa6571275,start X-Google-Attributes: gidf6653,public X-Google-Thread: 1093da,16d7807aa6571275,start X-Google-Attributes: gid1093da,public X-Google-Thread: 1112c7,16d7807aa6571275,start X-Google-Attributes: gid1112c7,public From: stevebo@onramp.net (Steve Silberberg) Subject: Need help with Sparc Assembler Date: 1998/02/02 Message-ID: <6b52s8$ff9$1@news.onramp.net> X-Deja-AN: 321421754 Organization: Callipygian Productions Newsgroups: alt.lang.asm,comp.sys.sun.misc,dfw.test,gnu.gcc.help,uk.comp.sys.sun,alt.os.assembly