[test_rom] Fix global pointer initialization in test_rom_start.S

Signed-off-by: Alphan Ulusoy <alphan@google.com>
diff --git a/sw/device/lib/testing/test_rom/test_rom_start.S b/sw/device/lib/testing/test_rom/test_rom_start.S
index 6a968a7..b175414 100644
--- a/sw/device/lib/testing/test_rom/test_rom_start.S
+++ b/sw/device/lib/testing/test_rom/test_rom_start.S
@@ -86,10 +86,17 @@
   .global _reset_start
   .type _reset_start, @function
 _reset_start:
+
+  // Set up the global pointer. This requires that we disable linker relaxations
+  // (or it will be relaxed to `mv gp, gp`).
+  .option push
+  .option norelax
+  la  gp, __global_pointer$
+  .option pop
+
   // Clobber all writeable registers.
   li  x1, 0x0
   li  x2, 0x0
-  li  x3, 0x0
   li  x4, 0x0
   li  x5, 0x0
   li  x6, 0x0
@@ -122,12 +129,6 @@
   // Set up the stack.
   la  sp, _stack_end
 
-  // Set up the global pointer. This requires that we disable linker relaxations
-  // (or it will be relaxed to `mv gp, gp`).
-  .option push
-  .option norelax
-  la  gp, __global_pointer$
-  .option pop
 
   // Explicit fall-through to `_start`.
   .size _reset_start, .-_reset_start