Skip to content
Commit 5a4b65ab authored by Richard Henderson's avatar Richard Henderson Committed by David Howells
Browse files

MN10300: gcc 4.6 vs am33 inline assembly



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>
parent 1a8d59e5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment