passes: handle spilling of vector register in stack map

A vector of pointers may be packed into a vector register (xmm
register). It may be spilled an live across a statepoint. In
this case we need to mark all the fields of the spill slot as
live pointers in the stack map.

Change-Id: Ic32dc01a577687bf8b5d2d0b3eec4c27f7099429
Reviewed-on: https://go-review.googlesource.com/c/155762
Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/passes/GC.cpp b/passes/GC.cpp
index c754c50..71c29cd 100644
--- a/passes/GC.cpp
+++ b/passes/GC.cpp
@@ -98,7 +98,16 @@
         break;
       }
 
+      // Another case of aggregate type is a spill of a vector of pointers.
+      if (Loc.Size > PtrSize) {
+        assert(Loc.Type == StackMaps::Location::Indirect);
+        for (unsigned j = 0; j < Loc.Size / PtrSize; j++)
+          BV.set(Idx + j);
+        break;
+      }
+
       // A single pointer slot.
+      assert(Loc.Size == PtrSize);
       if (Idx >= BV.size())
         // This can happen if Loc is an arg slot (for byVal aggregate type).
         BV.resize(Idx + 1);