[m-rev.] Re: for review: don't make asm label functions static

Peter Wang novalazy at gmail.com
Thu Jul 8 14:37:39 AEST 2010


On 2010-07-08, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> 
> I did a bootcheck on an x86_64 machine with gcc-4.3 and -O4 and it
> passed.  However when I installed it and used the installed version to
> build hello world, the executable segfaults.  I reverted my change and
> reinstalled and still got a segfault.  Then I did a clean check out,
> reverted my change and installed, and that worked.
> 
> I have reverted my change for now until we can figure out what's going on.

There were no differences in any of the non-PIC object files.

We disassembled list.pic_o before and after removing the `static'
keyword.  All the differences were as below: mov -> lea

--- /home/pwa/a1        2010-07-08 14:17:47.000000000 +1000
+++ /home/pwa/a2        2010-07-08 14:17:51.000000000 +1000
@@ -1554,7 +1554,7 @@
 00000000000015c8 <<predicate 'list.reverse'/2 mode 0>>:
     15c8:      4d 89 fe                mov    %r15,%r14
     15cb:      45 31 ff                xor    %r15d,%r15d
-    15ce:      48 8b 05 b3 16 02 00    mov    0x216b3(%rip),%rax        # 22c88 <<predicate 'list.UnusedArgs__pred__reverse_2__[1]_0'/3 mode 0>>
+    15ce:      48 8d 05 b3 16 02 00    lea    0x216b3(%rip),%rax        # 22c88 <<predicate 'list.UnusedArgs__pred__reverse_2__[1]_0'/3 mode 0>>
     15d5:      ff e0                   jmpq   *%rax
     15d7:      66 0f 1f 84 00 00 00    nopw   0x0(%rax,%rax,1)
     15de:      00 00 

Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list