Like Tree1Likes
  • 1 Post By brewbuck

does ARM have names backwards for inequalities?

This is a discussion on does ARM have names backwards for inequalities? within the Tech Board forums, part of the Community Boards category; < is less than and > is greater than In arm if you want to check r1 > r2 the ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    122

    does ARM have names backwards for inequalities?

    < is less than and > is greater than
    In arm if you want to check r1 > r2
    the code is
    Code:
    cmp r1, r2
    blt label1
    Shouldn't the name actually be glt? Or am I confused?

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,249
    You're assuming that because r1 is on the left in the assembly instruction that it corresponds with the left hand side of the express "r1 > r2". That assumption is completely baseless.
    Ocifer likes this.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,566
    We would need to see the the high-level code and the rest of the assembly code to determine if it's correct. It really depends on whether the branch is taking you to the "if" part, or some "else" part, or the loop condition this belongs to.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inequalities and others
    By backtobasics in forum C Programming
    Replies: 1
    Last Post: 11-22-2011, 04:59 AM
  2. Mathmatics Question?? Absolute Value and Inequalities
    By xddxogm3 in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-27-2004, 04:35 PM
  3. Mathmatics Question?? Powers and inequalities.
    By xddxogm3 in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 09-26-2004, 10:12 PM
  4. Backwards
    By cyberCLoWn in forum C++ Programming
    Replies: 1
    Last Post: 04-07-2004, 08:11 AM
  5. Backwards Up-Down
    By Cactus_Hugger in forum Windows Programming
    Replies: 1
    Last Post: 11-08-2003, 04:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21