Beispiel #1
0
func BtoR(b uint64) int {
	b &= 0xffffffff
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + arm64.REG_R0
}
Beispiel #2
0
func BtoF(b uint64) int {
	b >>= 32
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + arm64.REG_F0
}
Beispiel #3
0
func BtoF(b uint64) int {
	b &= 0xFFFF0000
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) - 16 + x86.REG_X0
}
Beispiel #4
0
func BtoF(b uint64) int {
	b &= 0xfffc0000
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) - 16 + arm.REG_F0
}
Beispiel #5
0
func BtoR(b uint64) int {
	b &= 0xff
	if b == 0 {
		return 0
	}
	return gc.Bitno(b) + x86.REG_AX
}
Beispiel #6
0
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
}
Beispiel #7
0
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
}