Skip to content

Instantly share code, notes, and snippets.

Nick Desaulniers nickdesaulniers

Block or report user

Report or block nickdesaulniers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bttv-cards.i
enum { a } b(void);
c, d, g, h;
i(int);
j() {
int e;
asm goto("" : : : : f);
return a;
f:;
}
k() { asm("" : : "Qo"(d), "r"(c)); }
View bttv-cards.i
This file has been truncated, but you can view the full file.
# 1 "drivers/media/pci/bt8xx/bttv-cards.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 359 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "././include/linux/kconfig.h" 1
View gist:c44e2244a04e8700041b1d38af6a94ce
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index 9b9efe33cfed..159c63a5c5c4 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -1061,5 +1061,55 @@ TEST(InstructionsTest, FNegInstruction) {
FNeg->deleteValue();
}
+TEST(InstructionsTest, CallBrInstruction) {
+ LLVMContext Context;
View foo.diff
diff --git a/arch/x86/purgatory/string.c b/arch/x86/purgatory/string.c
index 3cb67d44ca31..d2b2364ea2e8 100644
--- a/arch/x86/purgatory/string.c
+++ b/arch/x86/purgatory/string.c
@@ -10,4 +10,27 @@
#include <linux/types.h>
-#include "../boot/compressed/string.c"
+#include "../boot/string.c"
View callbr.ll
; RUN: opt -loop-unroll -S -o - %s 2>&1 | FileCheck %s
; CHECK: if.then:
; CHECK-NEXT: callbr void asm sideeffect "1: nop\0A\09.quad b, ${0:l}, $$5\0A\09", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@d, %l_yes))
; CHECK-NEXT: to label %asm.fallthrough [label %l_yes]
; CHECK: l_yes:
; CHECK: if.then.1:
; CHECK-NEXT: callbr void asm sideeffect "1: nop\0A\09.quad b, ${0:l}, $$5\0A\09", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@d, %l_yes.1))
; CHECK-NEXT: to label %asm.fallthrough.1 [label %l_yes.1]
View gist:d24891fc6fa5ad71ca804243720aa8ab
arch/x86/ia32/ia32_signal.o: warning: objtool: ia32_setup_rt_frame()+0x44c: call to memset() with UACCESS enabled
arch/x86/kernel/signal.o: warning: objtool: x32_setup_rt_frame()+0x226: call to memset() with UACCESS enabled
arch/x86/kernel/signal.o: warning: objtool: __setup_rt_frame()+0x23c: call to memset() with UACCESS enabled
mm/kasan/common.o: warning: objtool: kasan_report()+0x52: call to __stack_chk_fail() with UACCESS enabled
drivers/ata/sata_dwc_460ex.o: warning: objtool: sata_dwc_bmdma_start_by_tag()+0x3a0: can't find switch jump table
lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x8d: call to memcpy() with UACCESS enabled
lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x8d: call to memcpy() with UACCESS enabled
drivers/gpu/drm/i915/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x56: redundant UACCESS disable
View 0000-generic.get_fixed_ranges.ll
*** IR Dump After Loop-Closed SSA Form Pass ***
; Function Attrs: noredzone nounwind sspstrong
define hidden void @get_fixed_ranges(i8* nocapture) local_unnamed_addr #0 {
%2 = bitcast i8* %0 to i32*
tail call void @k8_check_syscfg_dram_mod_en() #5
%3 = tail call { i64, i64 } asm sideeffect "1: rdmsr\0A2:\0A .pushsection \22__ex_table\22,\22a\2
2\0A .balign 4\0A .long (1b) - .\0A .long (2b) - .\0A .long (ex_handler_rdmsr_unsafe) - .\0A .popse
ction\0A", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 592) #6, !srcloc !3
%4 = extractvalue { i64, i64 } %3, 0
%5 = extractvalue { i64, i64 } %3, 1
View generic.get_fixed_ranges.ll
; llvm-extract -func get_fixed_ranges generic.ll -o generic.get_fixed_ranges.ll -S --recursive
; ModuleID = 'generic.ll'
source_filename = "arch/x86/kernel/cpu/mtrr/generic.c"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.cpuinfo_x86 = type { i8, i8, i8, i8, i32, i8, i8, i8, i8, i32, i32, [20 x i32], [16 x i8], [64 x i8], i32, i32, i32, i32, i32, i64, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i8, i8 }
%struct.tracepoint = type { i8*, %struct.static_key, i32 ()*, void ()*, %struct.tracepoint_func* }
%struct.static_key = type { %struct.atomic_t, %union.anon }
%struct.atomic_t = type { i32 }
View __jump_table.txt
; $ objdump -d -r -j __jump_table arch/x86/kernel/cpu/mtrr/generic.o
arch/x86/kernel/cpu/mtrr/generic.o: file format elf64-x86-64
Disassembly of section __jump_table:
0000000000000000 <__jump_table>:
...
10: R_X86_64_PC32 .text+0x3f9
View __jump_table.txt
; $ objdump -d -r -j __jump_table arch/x86/kernel/cpu/mtrr/generic.o
arch/x86/kernel/cpu/mtrr/generic.o: file format elf64-x86-64
Disassembly of section __jump_table:
0000000000000000 <__jump_table>:
...
10: R_X86_64_PC32 .text+0x3f9
You can’t perform that action at this time.