From 132dcea0af0f14166783f0fd4b0df32bfb91f24a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 18 Jan 2020 13:03:35 +0100 Subject: pkg/compiler: generate const[0] for flags w/o values Generate const[0] for flags without values and for flags with a single value which is 0. This is the intention in all existing cases (e.g. an enum with types of something, but there is really only 1 type exists). --- sys/fuchsia/gen/amd64.go | 6 +++--- sys/fuchsia/gen/arm64.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/fuchsia') diff --git a/sys/fuchsia/gen/amd64.go b/sys/fuchsia/gen/amd64.go index 6d7ec5c40..b773fbf8d 100644 --- a/sys/fuchsia/gen/amd64.go +++ b/sys/fuchsia/gen/amd64.go @@ -6982,7 +6982,7 @@ var syscalls_amd64 = []*Syscall{ &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "port", TypeSize: 4}}, &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 1000, ValuesPerProc: 4}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "signals", TypeSize: 4}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_async_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{0}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_async_options", FldName: "options", TypeSize: 8}}}, }}, {Name: "zx_object_wait_many", CallName: "zx_object_wait_many", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "items", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "zx_wait_item"}}}}, @@ -7192,7 +7192,7 @@ var syscalls_amd64 = []*Syscall{ }}, {Name: "zx_vmo_create", CallName: "zx_vmo_create", Args: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "size", TypeSize: 8}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "vmo_create_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{0}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "vmo_create_options", FldName: "options", TypeSize: 8}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "out", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_vmo", TypeSize: 4, ArgDir: 1}}}, }}, {Name: "zx_vmo_create_child", CallName: "zx_vmo_create_child", Args: []Type{ @@ -7475,4 +7475,4 @@ var consts_amd64 = []ConstValue{ {Name: "fuchsia_power_Status_OK"}, } -const revision_amd64 = "329fe6a047fa9d6a9ad388c2e46e5d3dc9ab6c72" +const revision_amd64 = "47abadd15b0249252c1c64f699c25cff8e637f6f" diff --git a/sys/fuchsia/gen/arm64.go b/sys/fuchsia/gen/arm64.go index fbfd0f29e..cad6bd78f 100644 --- a/sys/fuchsia/gen/arm64.go +++ b/sys/fuchsia/gen/arm64.go @@ -6982,7 +6982,7 @@ var syscalls_arm64 = []*Syscall{ &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_port", FldName: "port", TypeSize: 4}}, &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 1000, ValuesPerProc: 4}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "signals", TypeSize: 4}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_async_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{0}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_async_options", FldName: "options", TypeSize: 8}}}, }}, {Name: "zx_object_wait_many", CallName: "zx_object_wait_many", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "items", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "zx_wait_item"}}}}, @@ -7192,7 +7192,7 @@ var syscalls_arm64 = []*Syscall{ }}, {Name: "zx_vmo_create", CallName: "zx_vmo_create", Args: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "size", TypeSize: 8}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "vmo_create_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{0}, BitMask: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "vmo_create_options", FldName: "options", TypeSize: 8}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "out", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "zx_vmo", TypeSize: 4, ArgDir: 1}}}, }}, {Name: "zx_vmo_create_child", CallName: "zx_vmo_create_child", Args: []Type{ @@ -7475,4 +7475,4 @@ var consts_arm64 = []ConstValue{ {Name: "fuchsia_power_Status_OK"}, } -const revision_arm64 = "e0903c549d1df4deee6c6891fa0b9220464983d4" +const revision_arm64 = "416f52d4efcccffaf25ed9c4ed2a6bb846e5e2af" -- cgit mrf-deployment