Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [omr-dev] Comparison opcodes

Hi Dibyendu,

You can find the type for any opcode in the ILOpCodeProperties.hpp. For icmpeq/icmpne you will see the data type is Int32 - they produce a value of 0 or 1 that is 32bits wide. Other nodes can reference the icmp* nodes to use their value - no value is actually set or changed - the opcode is purely functional generating an integer value you can use in subsequent trees. The code generators may optimize the use of this opcode depending on the patterns in the trees and the instructions available in the hardware being targeted.

In general all of the *cmp* opcodes behave in this same way - they produce a value like any other node with no side-effect of storing any value.

Cheers,

Andrew Craik
Testarossa JIT Common Optimizer and x86 Code Generation Team Lead
JIT Compiler Development and Performance
IBM Canada Lab

Phone: 1-905-413-3620
E-mail:
ajcraik@xxxxxxxxxx
Find me on:
LinkedIn: http://linkedin.com/in/andrewcraik
IBM

8200 Warden Ave
Markham, ON L6G 1C7
Canada


Inactive hide details for Dibyendu Majumdar ---23-06-2018 20:44:29---Hi, I wanted to understand the result of a comparison op:Dibyendu Majumdar ---23-06-2018 20:44:29---Hi, I wanted to understand the result of a comparison op:

From: Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx>
To: omr developer discussions <omr-dev@xxxxxxxxxxx>
Date: 23-06-18 20:44
Subject: [omr-dev] Comparison opcodes
Sent by: omr-dev-bounces@xxxxxxxxxxx




Hi,

I wanted to understand the result of a comparison op:

a) What is the type?
b) What value is set when the condition is true / false?
c) Is this true for all comparison op codes?


Thanks and Regards
Dibyendu
_______________________________________________
omr-dev mailing list
omr-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/omr-dev





Back to the top