x86: Get rid of duplication between *_rnd_template.c

Signed-off-by: Martin Storsjö <martin@martin.st>