Re: [PATCH 03/10] MIPS: End asm function prologue macros with .insn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Maciej,

On Monday, 7 November 2016 14:33:03 GMT Maciej W. Rozycki wrote:
>  As these macros can be used at such places too I think it makes sense to
> imply `.insn' with the macro itself so that it's semantically consistent
> rather than requiring people to explicitly place the pseudo-op at macro
> expansion sites as required.  I'm not sure if I indeed like the idea of
> placing EXPORT_SYMBOL in the middle of a code block, as I find it
> inconsistent with C usage where, by convention, it only comes at the end
> of a function's body.  That is a separate matter though, so for this
> change only:
> 
> Reviewed-by: Maciej W. Rozycki <macro@xxxxxxxxxx>
> 
>  Thank you for your work in this area!

And thanks for your review :)

For the record, the reason I went with placing the EXPORT_SYMBOL invocations 
at the start of the functions rather than the end is that the end isn't always 
the end of the code in question. For example (until another patch of mine) 
memcpy ends part way through user_copy, with code continuing afterwards. We 
would then need to place a .insn after the use of EXPORT_SYMBOL if any code 
may branch there. Containing the need for .insn to the start of the function 
seems neater since a function should always begin with an instruction, which 
after this patch will be marked as such, and users of the macros will just get 
behaviour that seems natural & expected.

Of course another alternative would be to place EXPORT_SYMBOL before LEAF/
NESTED/FEXPORT, but I don't think that would really make any difference  
presuming people agree that this patch is a good idea regardless.

Thanks,
    Paul

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux