B3 needs a special WasmAddress Opcode
[WebKit-https.git] / Source / JavaScriptCore / b3 / B3Validate.cpp
index b06344e..3c002ed 100644 (file)
@@ -371,6 +371,12 @@ public:
                 VALIDATE(value->type() == Void, ("At ", *value));
                 validateStackAccess(value);
                 break;
+            case WasmAddress:
+                VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
+                VALIDATE(value->numChildren() == 1, ("At ", *value));
+                VALIDATE(value->child(0)->type() == pointerType(), ("At ", *value));
+                VALIDATE(value->type() == pointerType(), ("At ", *value));
+                break;
             case CCall:
                 VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
                 VALIDATE(value->numChildren() >= 1, ("At ", *value));