Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
60c59d5b
Commit
60c59d5b
authored
22 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
Add flag to specify when no value is produced by an instruction
llvm-svn: 4441
parent
c1d75635
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/lib/Target/X86/X86InstrInfo.def
+13
-12
13 additions, 12 deletions
llvm/lib/Target/X86/X86InstrInfo.def
llvm/lib/Target/X86/X86InstrInfo.h
+9
-0
9 additions, 0 deletions
llvm/lib/Target/X86/X86InstrInfo.h
with
22 additions
and
12 deletions
llvm/lib/Target/X86/X86InstrInfo.def
+
13
−
12
View file @
60c59d5b
...
@@ -19,28 +19,29 @@
...
@@ -19,28 +19,29 @@
// #3: Instruction Flags - This should be a field or'd together that contains
// #3: Instruction Flags - This should be a field or'd together that contains
// constants from the MachineInstrInfo.h file.
// constants from the MachineInstrInfo.h file.
// #4: Target Specific Flags - Another bitfield containing X86 specific flags
// #4: Target Specific Flags - Another bitfield containing X86 specific flags
// that we are interested in for each instruction
// that we are interested in for each instruction. These should be flags
// defined in X86InstrInfo.h in the X86II namespace.
//
//
// The first instruction must always be the PHI instruction:
// The first instruction must always be the PHI instruction:
(FIXME, not yet)
I(PHI , "phi", 0, 0)
I(PHI , "phi", 0, 0)
// The second instruction must always be the noop instruction
// The second instruction must always be the noop instruction
: (FIXME, not yet)
I(NOOP , "nop", 0,
0)
// nop 90
I(NOOP , "nop", 0,
X86II::Void)
// nop 90
// Miscellaneous instructions
// Miscellaneous instructions
I(RET , "ret", M_RET_FLAG,
0)
// ret CB
I(RET , "ret", M_RET_FLAG,
X86II::Void)
// ret CB
// Move instructions
// Move instructions
I(MOVir8 , "movb", 0, 0) // R = imm8 B0+ rb
I(MOVir8 , "movb", 0, 0)
// R = imm8 B0+ rb
I(MOVir16 , "movw", 0, 0) // R = imm16 B8+ rw
I(MOVir16 , "movw", 0, 0)
// R = imm16 B8+ rw
I(MOVir32 , "movl", 0, 0) // R = imm32 B8+ rd
I(MOVir32 , "movl", 0, 0)
// R = imm32 B8+ rd
// Arithmetic instructions
// Arithmetic instructions
I(ADDrr8 , "addb", 0, 0) // R8 += R8 00/r
I(ADDrr8 , "addb", 0, 0)
// R8 += R8 00/r
I(ADDrr16 , "addw", 0, 0) // R16 += R16 01/r
I(ADDrr16 , "addw", 0, 0)
// R16 += R16 01/r
I(ADDrr32 , "addl", 0, 0) // R32 += R32 02/r
I(ADDrr32 , "addl", 0, 0)
// R32 += R32 02/r
// At this point, I is dead
t
o undefine the macro
// At this point, I is dead
, s
o undefine the macro
#undef I
#undef I
This diff is collapsed.
Click to expand it.
llvm/lib/Target/X86/X86InstrInfo.h
+
9
−
0
View file @
60c59d5b
...
@@ -10,6 +10,15 @@
...
@@ -10,6 +10,15 @@
#include
"llvm/Target/MachineInstrInfo.h"
#include
"llvm/Target/MachineInstrInfo.h"
#include
"X86RegisterInfo.h"
#include
"X86RegisterInfo.h"
/// X86II - This namespace holds all of the target specific flags that
/// instruction info tracks.
///
namespace
X86II
{
enum
{
Void
=
1
<<
0
,
// Set if this instruction produces no value
};
}
class
X86InstrInfo
:
public
MachineInstrInfo
{
class
X86InstrInfo
:
public
MachineInstrInfo
{
const
X86RegisterInfo
RI
;
const
X86RegisterInfo
RI
;
public:
public:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment