sim-se: Refactor clone to avoid most ifdefs

Some parts of clone are architecture dependent. In some cases, we are
able to use architecture-specific helper functions or register
aliases. However, there is still some architecture-specific that is
protected by ifdefs in the common clone implementation.

Move these architecture-specific bits to the architecture-specific OS
class instead to avoid these ifdefs and make the code a bit more

Change-Id: Ia0903d738d0ba890863bddfa77e3b717db7f45de
Signed-off-by: Andreas Sandberg <>
Cc: Giacomo Travaglini <>
Cc: Javier Setoain <>
Cc: Brandon Potter <>
Reviewed-by: Jason Lowe-Power <>
Maintainer: Brandon Potter <>
6 files changed