------- Comment #3 from steven at gcc dot gnu dot org 2009-03-17 07:20 ------- Copying a pseudo to the required register before an __asm__ is not so easy, because at expand time the data flow engine doesn't know anything, it's not even initialized.
What you could do, I suppose in cfgexpand.c * before expand_used_vars(), scan the cfun->local_decl list and make a separate list of local register values, say a VEC(tree,heap) local_reg_var_decls * expand local register vars as usual, assigning pseudos to the local var * every time before expanding __asm__, walk the local_reg_var_decls list and shink-wrap the __asm__ with moves from/to the location where the var lives (must be a pseudo, I suppose) to/from the required register -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38815