• Richard Henderson's avatar
    MN10300: gcc 4.6 vs am33 inline assembly · 5a4b65ab
    Richard Henderson authored
    GCC 4.6 explicitly represents the MDR register.  It may be accessed
    via the "z" constraint.  Perhaps more importantly, it tracks when
    the MDR register is clobbered and uses the RETF instruction if the
    incoming value is still valid.
    
    Thus it is important to (at least) clobber the MDR register in
    relevant inline assembly fragments, lest RETF be used incorrectly.
    
    The only instances I could find are here.  There are reads of the
    MDR register in kernel/gdb-stub.c, but that's harmless.  Although,
    frankly, __builtin_return_address(0) might be a better thing in
    those cases.  Certainly MDR isn't going to contain anything else
    that might be useful...
    Signed-off-by: default avatarRichard Henderson  <rth@redhat.com>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    5a4b65ab
div64.h 3.21 KB