Also use it instead of duplicating the code. Fixes #326 Signed-off-by: Kevin Petit <kevin.petit@arm.com>