Compiling: “bad register name `%rsp’”

Check if the arch you are compiling for (or in) has the register you try. For example the rsp register is x86_64, not x86…