lkml.org 
[lkml]   [2012]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 01/22] ARM: add mechanism for late code patching
    On 08/08/12 01:56, Nicolas Pitre wrote:
    > On Tue, 7 Aug 2012, Cyril Chemparathy wrote:
    [...]
    >> u32 arm_check[] = {
    >> 0xe2810041, 0xe2810082, 0xe2810f41, 0xe2810f82, 0xe2810e41,
    >> 0xe2810e82, 0xe2810d41, 0xe2810d82, 0xe2810c41, 0xe2810c82,
    >> 0xe2810b41, 0xe2810b82, 0xe2810a41, 0xe2810a82, 0xe2810941,
    >> 0xe2810982, 0xe2810841, 0xe2810882, 0xe2810741, 0xe2810782,
    >> 0xe2810641, 0xe2810682, 0xe2810541, 0xe2810582, 0xe2810441,
    >> };
    >
    > Instead of using this array you could let the assembler do it for you
    > like this:
    >
    > asm (" \n\
    > .arm \n\
    > arm_check: \n\
    > .set shft, 0 \n\
    > .rep 12 \n\
    > add r1, r2, #0x81 << \shft \n\
    > .set shft, \shft + 2 \n\
    > .endr \n\
    > ");
    >

    Neat macro magic. Are you thinking that we build this in as a self test
    in the code?

    Thanks
    -- Cyril.


    \
     
     \ /
      Last update: 2012-08-08 19:43    [W:5.477 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site