Re: Fwd: [Bug 503185] Re: fails to build on armel/lucid

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Jan 18 2010 - 07:50:05 PST

  • Next message: Majordomo admin: "Urgent Reply Needed."
    I know next to nothing about the Thumb ISA or any of the specific issues 
    the patch addresses.
    However, to the degree that I do understand ARM assembly (having written 
    the original code with it's direct read and write of 'pc'), the patch 
    looks fine.
    I also have not tested this.  Somebody should do so.
    
    -Paul
    
    
    Alan Woodland wrote:
    > Apparently there is another issue:
    >
    > /tmp/cckH6Lu5.s: Assembler messages:
    > /tmp/cckH6Lu5.s:730: Error: only SUBS PC, LR, #const allowed -- `sub
    > pc,r3,#(0xffff0fff-0xffff0fc0)'
    > /tmp/cckH6Lu5.s:791: Error: only SUBS PC, LR, #const allowed -- `sub
    > pc,r3,#(0xffff0fff-0xffff0fc0)'
    > /tmp/cckH6Lu5.s:910: Error: only SUBS PC, LR, #const allowed -- `sub
    > pc,r3,#(0xffff0fff-0xffff0fc0)'
    >
    > Does the patch proposed look reasonable to you?
    >
    > Alan
    >
    >
    > ---------- Forwarded message ----------
    > From: Dave Martin <Dave.Martin_at_arm_dot_com>
    > Date: 2010/1/18
    > Subject: [Bug 503185] Re: fails to build on armel/lucid
    > To: awoodland_at_debian_dot_org
    >
    >
    > ARMv7 generally does not allow the PC to be used as a destination
    > register for random operations.  The code will also not work in Thumb
    > because the "Thumb bit" in the return address (bottom bit of lr) is not
    > set properly.
    >
    > The best way to fix this is to precompute the address of the kuser
    > helper code to call (in r3) and call it with BLX r3.  This only works on
    > v5 and above; this is reasonable because the code won't build for Thumb
    > on ARMv4T anyway for various other reasons.
    >
    > The attached patch attempts to do this when appropriate.
    >
    > I will try to test it, but haven't been able to do so yet.
    >
    > ** Attachment added: "Patch to call the kuser helper functions in a
    > Thumb-2 compatible way"
    >   http://launchpadlibrarian.net/38032395/cr_atomic_arm.diff
    >
    >   
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    

  • Next message: Majordomo admin: "Urgent Reply Needed."