Log in

No account? Create an account
odd - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

odd [Dec. 6th, 2000|06:15 am]
Brad Fitzpatrick
passing arrays by references works now, but the address passed is off by 8 bytes it seems.
figure out why, or add instructions to correct address everytime? *sigh*
wish i had more time to do this all correctly.
hacks on hacks get hard to work with over time.

    // HACK/FIXME/SUCK: we're off by 8 bytes, for some reasons.
    Reg hack = rb->newReg();
    TheAssembler->moveImmediate(hack, 8);
    TheAssembler->binop(PLUS, base, base, hack);

[User Picture]From: mart
2000-12-06 08:21 am (UTC)
Bodgefix solutions are fun. That is, until you return to the code a while later and can't work out why you are adding on an arbitrary number/word/whatever to a value.

My d=d bodgefix is still present in the mIRC-LJ code. You've just reminded me... I really should work out what I'm doing that's causing the first key/value pair I pass to not be interpreted correctly.

# BODGE: Add 2 and times by five, raise to the power 9 and subtract the last byte of my IP address
(Reply) (Thread)