func (p *Parser) register(name string, prefix rune) (r1, r2 int16, scale int8, ok bool) {
	// R1 or R(1) R1:R2 R1,R2 R1+R2, or R1*scale.
	r1, ok = p.registerReference(name)
	if !ok {
		return
	}
	if prefix != 0 && prefix != '*' { // *AX is OK.
		p.errorf("prefix %c not allowed for register: %c%s", prefix, prefix, name)
	}
	c := p.peek()
	if c == ':' || c == ',' || c == '+' {
		// 2nd register; syntax (R1+R2) etc. No two architectures agree.
		// Check the architectures match the syntax.
		switch p.next().ScanToken {
		case ',':
			if !p.arch.InFamily(sys.ARM, sys.ARM64) {
				p.errorf("(register,register) not supported on this architecture")
				return
			}
		case '+':
			if p.arch.Family != sys.PPC64 {
				p.errorf("(register+register) not supported on this architecture")
				return
			}
		}
		name := p.next().String()
		r2, ok = p.registerReference(name)
		if !ok {
			return
		}
	}
	if p.peek() == '*' {
		// Scale
		p.next()
		scale = p.parseScale(p.next().String())
	}
	return r1, r2, scale, true
}
// register parses a full register reference where there is no symbol present (as in 4(R0) or R(10) but not sym(SB))
// including forms involving multiple registers such as R1:R2.
register parses a full register reference where there is no symbol present (as in 4(R0) or R(10) but not sym(SB))
including forms involving multiple registers such as R1:R2.
// register parses a full register reference where there is no symbol present ( as in 4 ( R0 ) or R ( 10 ) but not sym ( SB )) // including forms involving multiple registers such as R1 : R2 .
func (p *Parser) register(name string, prefix rune) (r1, r2 int16, scale int8, ok bool) {
	r1, ok = p.registerReference(name)
	if !ok {
		return
	}
	if prefix != 0 && prefix != '*' { 
		p.errorf("prefix %c not allowed for register: %c%s", prefix, prefix, name)
	}
	c := p.peek()
	if c == ':' || c == ',' || c == '+' {
		switch p.next().ScanToken {
		case ',':
			if !p.arch.InFamily(sys.ARM, sys.ARM64) {
				p.errorf("(register,register) not supported on this architecture")
				return
			}
		case '+':
			if p.arch.Family != sys.PPC64 {
				p.errorf("(register+register) not supported on this architecture")
				return
			}
		}
		name := p.next().String()
		r2, ok = p.registerReference(name)
		if !ok {
			return
		}
	}
	if p.peek() == '*' {
		p.next()
		scale = p.parseScale(p.next().String())
	}
	return r1, r2, scale, true
}
func ( p * Parser ) register ( name string , prefix rune ) ( r1 , r2 int16 , scale int8 , ok bool ) { r1 , ok = p . registerReference ( name ) if ! ok { return } if prefix != 0 && prefix != '*' { p . errorf ( " " , prefix , prefix , name ) } c := p . peek ( ) if c == ':' || c == ',' || c == '+' { switch p . next ( ) . ScanToken { case ',' : if ! p . arch . InFamily ( sys . ARM , sys . ARM64 ) { p . errorf ( " " ) return } case '+' : if p . arch . Family != sys . PPC64 { p . errorf ( " " ) return } } name := p . next ( ) . String ( ) r2 , ok = p . registerReference ( name ) if ! ok { return } } if p . peek ( ) == '*' { p . next ( ) scale = p . parseScale ( p . next ( ) . String ( ) ) } return r1 , r2 , scale , true }
register parses a full register reference where there is no symbol present (as in 4(R0) or R(10) but not sym(SB))
including forms involving multiple registers such as R1:R2.
register parses a full register reference where there is no symbol present ( as in 4 ( R0 ) or R ( 10 ) but not sym ( SB )) including forms involving multiple registers such as R1 : R2 .
// R1 or R(1) R1:R2 R1,R2 R1+R2, or R1*scale. // *AX is OK. // 2nd register; syntax (R1+R2) etc. No two architectures agree. // Check the architectures match the syntax. // Scale