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
3a7beafb
Commit
3a7beafb
authored
11 years ago
by
Tom Stellard
Browse files
Options
Downloads
Patches
Plain Diff
R600/SI: Emit configuration value in the .AMDGPU.config ELF section
llvm-svn: 179545
parent
9991659f
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/R600/AMDGPUAsmPrinter.cpp
+9
-1
9 additions, 1 deletion
llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
llvm/test/CodeGen/R600/elf.ll
+1
-0
1 addition, 0 deletions
llvm/test/CodeGen/R600/elf.ll
with
10 additions
and
1 deletion
llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
+
9
−
1
View file @
3a7beafb
...
@@ -21,7 +21,10 @@
...
@@ -21,7 +21,10 @@
#include
"AMDGPU.h"
#include
"AMDGPU.h"
#include
"SIMachineFunctionInfo.h"
#include
"SIMachineFunctionInfo.h"
#include
"SIRegisterInfo.h"
#include
"SIRegisterInfo.h"
#include
"llvm/MC/MCContext.h"
#include
"llvm/MC/MCSectionELF.h"
#include
"llvm/MC/MCStreamer.h"
#include
"llvm/MC/MCStreamer.h"
#include
"llvm/Support/ELF.h"
#include
"llvm/Support/TargetRegistry.h"
#include
"llvm/Support/TargetRegistry.h"
#include
"llvm/Target/TargetLoweringObjectFile.h"
#include
"llvm/Target/TargetLoweringObjectFile.h"
...
@@ -50,10 +53,15 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
...
@@ -50,10 +53,15 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
if
(
OutStreamer
.
hasRawTextSupport
())
{
if
(
OutStreamer
.
hasRawTextSupport
())
{
OutStreamer
.
EmitRawText
(
"@"
+
MF
.
getName
()
+
":"
);
OutStreamer
.
EmitRawText
(
"@"
+
MF
.
getName
()
+
":"
);
}
}
OutStreamer
.
SwitchSection
(
getObjFileLowering
().
getTextSection
());
if
(
STM
.
device
()
->
getGeneration
()
>
AMDGPUDeviceInfo
::
HD6XXX
)
{
if
(
STM
.
device
()
->
getGeneration
()
>
AMDGPUDeviceInfo
::
HD6XXX
)
{
const
MCSectionELF
*
ConfigSection
=
getObjFileLowering
().
getContext
()
.
getELFSection
(
".AMDGPU.config"
,
ELF
::
SHT_NULL
,
0
,
SectionKind
::
getReadOnly
());
OutStreamer
.
SwitchSection
(
ConfigSection
);
EmitProgramInfo
(
MF
);
EmitProgramInfo
(
MF
);
}
}
OutStreamer
.
SwitchSection
(
getObjFileLowering
().
getTextSection
());
EmitFunctionBody
();
EmitFunctionBody
();
return
false
;
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
llvm/test/CodeGen/R600/elf.ll
+
1
−
0
View file @
3a7beafb
; RUN: llc < %s -march=r600 -mcpu=SI -filetype=obj | llvm-readobj -s - | FileCheck %s
; RUN: llc < %s -march=r600 -mcpu=SI -filetype=obj | llvm-readobj -s - | FileCheck %s
; CHECK: Format: ELF32
; CHECK: Format: ELF32
; CHECK: Name: .AMDGPU.config
define
void
@test
(
i32
%p
)
{
define
void
@test
(
i32
%p
)
{
%i
=
add
i32
%p
,
2
%i
=
add
i32
%p
,
2
%r
=
bitcast
i32
%i
to
float
%r
=
bitcast
i32
%i
to
float
...
...
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