Merge pull request #453 from owen-mc/update-architectures

Update Architectures.qll
This commit is contained in:
Owen Mansel-Chan
2021-01-15 16:01:52 +00:00
committed by GitHub

View File

@@ -6,7 +6,7 @@ import go
* An architecture that is valid in a build constraint.
*
* Information obtained from
* https://github.com/golang/go/blob/98cbf45cfc6a5a50cc6ac2367f9572cb198b57c7/src/go/types/gccgosizes.go
* https://github.com/golang/go/blob/e125ccd10ea191101dbc31f0dd39a98f9d3ab929/src/go/types/gccgosizes.go
* where the first field of the struct is 4 for 32-bit architectures
* and 8 for 64-bit architectures.
*/
@@ -15,13 +15,14 @@ class Architecture extends string {
Architecture() {
this in [
"386", "amd64p32", "arm", "armbe", "mips", "mipsle", "mips64p32", "mips64p32le", "ppc",
"s390", "sparc"
"386", "amd64p32", "arm", "armbe", "m64k", "mips", "mipsle", "mips64p32", "mips64p32le",
"nios2", "ppc", "riscv", "s390", "sh", "shbe", "sparc"
] and
bitSize = 32
or
this in [
"amd64", "arm64", "arm64be", "ppc64", "ppc64le", "mips64", "mips64le", "s390x", "sparc64"
"alpha", "amd64", "arm64", "arm64be", "ia64", "mips64", "mips64le", "ppc64", "ppc64le",
"riscv64", "s390x", "sparc64", "wasm"
] and
bitSize = 64
}