~mpu/qbe

2 2

RE: Return integers smaller than a word

Details
Message ID
<7AF0FF71-4161-4450-A694-F56E4E0BD920@forwarding.cc>
DKIM signature
missing
Download raw message
Hi,

Pretty sure this is a bug in the ABI used for Apple M1.
The following works with target is amd64_apple but dies
with "invalid class” when target is arm_apple.



export function ub $LF() {
@start
    ret 10
}

export function w $main(w %arg1, l %arg2) {
@start
    %a =ub call $LF()
    call $printf(l $str1, ..., ub %a)
    ret 0
}

data $str1 = { b "Hello world!%c", b 0 }



Best

-- David

Re: Return integers smaller than a word

Details
Message ID
<D0C893CC-806B-4D24-AE6A-92D13E33CA48@forwarding.cc>
In-Reply-To
<7AF0FF71-4161-4450-A694-F56E4E0BD920@forwarding.cc> (view parent)
DKIM signature
missing
Download raw message
Running it in CLion I can see it’s for an instruction with 
    op=86, 
    class=1 (long) and 
    register 33 (is that a FP register?)

HTH

-- David

Re: Return integers smaller than a word

Details
Message ID
<031e0de3-ee6b-454e-9d58-18017bc350ad@app.fastmail.com>
In-Reply-To
<D0C893CC-806B-4D24-AE6A-92D13E33CA48@forwarding.cc> (view parent)
DKIM signature
missing
Download raw message
Hi,

I may have fixed your issue in the latest
commit on the dev branch.

Cheers,
Reply to thread Export thread (mbox)