Removed redundant cmp #0 after lda
This commit is contained in:
parent
cbecb769a0
commit
5a944c65af
1 changed files with 0 additions and 12 deletions
|
|
@ -256,7 +256,6 @@ func (cg *comparisonGenerator) genMixedEqual() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", cg.skipLabel),
|
fmt.Sprintf("\tbne %s", cg.skipLabel),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -268,7 +267,6 @@ func (cg *comparisonGenerator) genMixedEqual() ([]string, error) {
|
||||||
fail := cg.tempLabel()
|
fail := cg.tempLabel()
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", fail),
|
fmt.Sprintf("\tbne %s", fail),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -346,7 +344,6 @@ func (cg *comparisonGenerator) genMixedNotEqual() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success),
|
fmt.Sprintf("\tbne %s", success),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -357,7 +354,6 @@ func (cg *comparisonGenerator) genMixedNotEqual() ([]string, error) {
|
||||||
|
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success),
|
fmt.Sprintf("\tbne %s", success),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -451,7 +447,6 @@ func (cg *comparisonGenerator) genMixedGreater() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", cg.skipLabel), // word too large
|
fmt.Sprintf("\tbne %s", cg.skipLabel), // word too large
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -463,7 +458,6 @@ func (cg *comparisonGenerator) genMixedGreater() ([]string, error) {
|
||||||
fail := cg.tempLabel()
|
fail := cg.tempLabel()
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", fail),
|
fmt.Sprintf("\tbne %s", fail),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -480,7 +474,6 @@ func (cg *comparisonGenerator) genMixedGreater() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success), // word_hi > 0 means always greater
|
fmt.Sprintf("\tbne %s", success), // word_hi > 0 means always greater
|
||||||
cg.loadOperand(wordOp, 0),
|
cg.loadOperand(wordOp, 0),
|
||||||
cg.cmpOperand(byteOp, 0),
|
cg.cmpOperand(byteOp, 0),
|
||||||
|
|
@ -493,7 +486,6 @@ func (cg *comparisonGenerator) genMixedGreater() ([]string, error) {
|
||||||
fail := cg.tempLabel()
|
fail := cg.tempLabel()
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success),
|
fmt.Sprintf("\tbne %s", success),
|
||||||
cg.loadOperand(wordOp, 0),
|
cg.loadOperand(wordOp, 0),
|
||||||
cg.cmpOperand(byteOp, 0),
|
cg.cmpOperand(byteOp, 0),
|
||||||
|
|
@ -586,7 +578,6 @@ func (cg *comparisonGenerator) genMixedGreaterEqual() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", cg.skipLabel),
|
fmt.Sprintf("\tbne %s", cg.skipLabel),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -597,7 +588,6 @@ func (cg *comparisonGenerator) genMixedGreaterEqual() ([]string, error) {
|
||||||
fail := cg.tempLabel()
|
fail := cg.tempLabel()
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", fail),
|
fmt.Sprintf("\tbne %s", fail),
|
||||||
cg.loadOperand(byteOp, 0),
|
cg.loadOperand(byteOp, 0),
|
||||||
cg.cmpOperand(wordOp, 0),
|
cg.cmpOperand(wordOp, 0),
|
||||||
|
|
@ -613,7 +603,6 @@ func (cg *comparisonGenerator) genMixedGreaterEqual() ([]string, error) {
|
||||||
if !cg.useLongJump {
|
if !cg.useLongJump {
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success),
|
fmt.Sprintf("\tbne %s", success),
|
||||||
cg.loadOperand(wordOp, 0),
|
cg.loadOperand(wordOp, 0),
|
||||||
cg.cmpOperand(byteOp, 0),
|
cg.cmpOperand(byteOp, 0),
|
||||||
|
|
@ -624,7 +613,6 @@ func (cg *comparisonGenerator) genMixedGreaterEqual() ([]string, error) {
|
||||||
|
|
||||||
return []string{
|
return []string{
|
||||||
cg.loadOperand(wordOp, 1),
|
cg.loadOperand(wordOp, 1),
|
||||||
"\tcmp #0",
|
|
||||||
fmt.Sprintf("\tbne %s", success),
|
fmt.Sprintf("\tbne %s", success),
|
||||||
cg.loadOperand(wordOp, 0),
|
cg.loadOperand(wordOp, 0),
|
||||||
cg.cmpOperand(byteOp, 0),
|
cg.cmpOperand(byteOp, 0),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue