aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2016-10-11 21:01:06 +0200
committerAndrey Konovalov <andreyknvl@google.com>2016-10-13 15:38:53 +0200
commit7686d19affbd3f592a64517679df85b9d49f4628 (patch)
tree624a97c2ea4c7e0ff01b13caef53c293085d0583 /sys
parentb3f098b002f4b68f0e3d38717bc610da268d0d18 (diff)
Add big-endian ints
Diffstat (limited to 'sys')
-rw-r--r--sys/decl.go25
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/decl.go b/sys/decl.go
index ba38399ba..da121b9e7 100644
--- a/sys/decl.go
+++ b/sys/decl.go
@@ -90,8 +90,9 @@ func (t ResourceType) InnerType() Type {
type FileoffType struct {
TypeCommon
- TypeSize uintptr
- File string
+ TypeSize uintptr
+ BigEndian bool
+ File string
}
func (t FileoffType) Size() uintptr {
@@ -167,9 +168,10 @@ func (t VmaType) InnerType() Type {
type LenType struct {
TypeCommon
- TypeSize uintptr
- ByteSize bool // want size in bytes instead of array size
- Buf string
+ TypeSize uintptr
+ BigEndian bool
+ ByteSize bool // want size in bytes instead of array size
+ Buf string
}
func (t LenType) Size() uintptr {
@@ -186,8 +188,9 @@ func (t LenType) InnerType() Type {
type FlagsType struct {
TypeCommon
- TypeSize uintptr
- Vals []uintptr
+ TypeSize uintptr
+ BigEndian bool
+ Vals []uintptr
}
func (t FlagsType) Size() uintptr {
@@ -204,9 +207,10 @@ func (t FlagsType) InnerType() Type {
type ConstType struct {
TypeCommon
- TypeSize uintptr
- Val uintptr
- IsPad bool
+ TypeSize uintptr
+ BigEndian bool
+ Val uintptr
+ IsPad bool
}
func (t ConstType) Size() uintptr {
@@ -252,6 +256,7 @@ const (
type IntType struct {
TypeCommon
TypeSize uintptr
+ BigEndian bool
Kind IntKind
RangeBegin int64
RangeEnd int64