x86: Factorize duplicated inline assembly snippets

Signed-off-by: Diego Biurrun <diego@biurrun.de>