Example #1
0
func BtoF(b uint64) int {
	b >>= 32
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + ppc64.REG_F0
}
Example #2
0
File: reg.go Project: Ericean/go
func BtoR(b uint64) int {
	b &= 0xff
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + x86.REG_AX
}
Example #3
0
func BtoR(b uint64) int {
	b &= 0xffffffff
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + ppc64.REG_R0
}
Example #4
0
File: reg.go Project: Ericean/go
func BtoF(b uint64) int {
	b &= 0xFF00
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) - 8 + x86.REG_X0
}
Example #5
0
File: reg.go Project: 2thetop/go
func BtoF(b uint64) int {
	b &= 0xfffc0000
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) - 16 + arm.REG_F0
}
Example #6
0
File: reg.go Project: Greentor/go
func BtoF(b uint64) int {
	b >>= 16
	b &= 0xffff
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + s390x.REG_F0
}
Example #7
0
File: reg.go Project: 2thetop/go
func BtoR(b uint64) int {
	// TODO Allow R0 and R1, but be careful with a 0 return
	// TODO Allow R9. Only R10 is reserved now (just g, not m).
	b &= 0x11fc // excluded R9 and R10 for m and g, but not R12
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + arm.REG_R0
}
Example #8
0
File: reg.go Project: danny8002/go
func BtoR(b uint64) int {
	b &= 0xffff
	if gc.Nacl {
		b &^= (1<<(x86.REG_BP-x86.REG_AX) | 1<<(x86.REG_R15-x86.REG_AX))
	} else if obj.Framepointer_enabled != 0 {
		// BP is part of the calling convention if framepointer_enabled.
		b &^= (1 << (x86.REG_BP - x86.REG_AX))
	}
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + x86.REG_AX
}