Sujet : Re: Bliss
De : johnrreagan (at) *nospam* earthlink.net (John Reagan)
Groupes : comp.os.vmsDate : 29. Jul 2024, 23:32:59
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <b9bbec52364cae3473516190449abdcf1ba91abb@i2pn2.org>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 7/26/2024 7:51 PM, Arne Vajhøj wrote:
On 7/26/2024 3:42 PM, John Reagan wrote:
On 7/25/2024 10:10 PM, Lawrence D'Oliveiro wrote:
Currently working my way through AA_H275C-TK (1983 edition). Adapted
this example from page 15-9:
>
MODULE quote_test_1 =
BEGIN
OWN x;
LITERAL mark = 4;
MACRO m = mark + %UNQUOTE mark %;
>
GLOBAL ROUTINE doit : NOVALUE =
BEGIN
LITERAL mark = 5;
x = m;
END;
>
END ELUDOM
>
When I look at the generated assembler
>
doit:
...
movq $10, x(%rip)
retq
>
That value should be 9, not 10.
>
What compiler is that from? That isn't even PIC code. And the $10 in the output is hex 10.
Matt Madisons open source Bliss compiler running on
Linux.
So not one of your compilers. :-)
Arne
Ah, that makes sense. My BLISS would generate
DOIT::
00000000: pushq %rbp # 000007
00000001: movq %rsp,%rbp
00000004: movq
X@GOTPCREL(%rip),%rax # 000010
0000000B: movl $00000009,(%rax)
00000011: popq %rbp # 000011
00000012: retq