SlideShare a Scribd company logo
1
VIXL
A runtime assembler C++ API
2
§  What isVIXL?
§  What is it used for?
§  What’s new inVIXL?
§  Conclusion & Q&A
Agenda
3
§  A Runtime code-generation library
§  for ARM AArch64 now, AArch32 (Arm and Thumb-2) coming CY2016
§  A program driven assembler, macro assembler, disassembler, simulator and debugger
§  Developed as the code generator for the GoogleV8 JavaScript AArch64 port
§  Available through GitHub
§  https://github.com/armvixl/vixl
§  Supports most of the instruction set
§  At EL1 (usertime)
§  With full NEON support
§  Used by a number of projects
§  Android’s ART, QEMU, HipHop, Mozilla, and more!
What isVIXL
4
VIXL’s Assembler
§  Example of a loop:
mov x0, 10
loop:
subs x0, x0, 1
bne loop
§  VIXL
Label loop;
mov(x0, 10);
Bind(&loop);
subs(x0, x0, 1);
b(&loop, ne);
5
§  Example of generating NEON code:
Ld1(v0.V8B, v1.V8B(), MemOperand(x0));
Saddl(v0.V8H(), v0.V8B(), v1.V8B());
Addv(h0, v0.V8H());
§  Will produce this code:
ld1 {v0.8b, v1.8b}, [x0]
saddl v0.8h, v0.8b, v1.8b
addv h0, v0.8h
§  Register methods (here, for exampleV8H()) determine
§  the number of lanes (8)
§  and size of the register (D or Q) (8*16bit = 128bits = Q)
NEON support in the assembler
6
§  WhileVIXL’s Assembler will generate one instruction, the MacroAssembler gives you a
lot more flexibility
§  AArch64 uses modified immediates
◦  mov r0, 0x10001 is permitted
◦  mov r0, 0x10002 is not!
§  MacroAssembler::Mov(r0, 0x10002) will do the job for you, using a pair of movz/movk or whatever
combination of instructions necessary
§  The MacroAssembler ultimately calls the Assembler
§  Simplifies your code without a deep knowledge of ARM AArch64
§  Sometimes it might optimize your code
§  But it’s still an assembler, not a compiler!
VIXL’s MacroAssembler
7
§  Will perform simple tricks to shorten your generated code
§  For example:
Add(w0, w0, 0x10002);
§  Will generate:
mov w16, #0x8001
add x0, x0, w16, lsl #1
§  Instead of the usual movz/movk for 0x10002
VIXL’s MacroAssembler (2)
8
§  In a JIT environment, simply run it
§  Natively,
§  Or Simulated
§  Save it for future reuse
§  Or generate an ELF file using elfio and link it to your application
§  Create a symbol for the generated functions using elfio
Elf_Word add_symbol(string_section_accessor& pStrWriter,
const char* str, Elf64_Addr value,
Elf_Xword size, unsigned char info,
unsigned char other, Elf_Half shndx );
symbols.add_symbol( strings, fn_name, fn_addr, fn_size, STB_GLOBAL,
STB_FUNC, 0, text_sec->get_index);
§  ELFio is available here: http://elfio.sourceforge.net
What to do with the generated code
9
§  The headers
#include <stdio.h>
#include "vixl/a64/assembler-a64.h"
#include "vixl/a64/disasm-a64.h"
using namespace vixl;
A quick example
10
int main(int argc, char ** argv) {
const size_t bufSize = 1024;
uint8_t* buffer = new uint8_t[bufSize];
Assembler asm_(buffer, bufSize);
asm_.orr(w0, wzr, 0x10001);
asm_.mov(x1, x0);
asm_.FinalizeCode();
BufferDisassembler disasm_(buffer,
asm_.CursorOffset());
}
A quick example (cont …)
11
class BufferDisassembler {
Decoder decoder_;
PrintDisassembler disasm_;
public:
BufferDisassembler(
uint8_t* buffer, size_t size)
: disasm_(stdout) {
decoder_.AppendVisitor(&disasm_);
uint32_t* instr =
reinterpret_cast<uint32_t*>(buffer);
for (; size > 0; size -= 4, instr++) {
decoder_.Decode(
reinterpret_cast<Instruction*>(instr));
}
}
};
A quick example (cont …)
12
§  Will output
0x00000000013ad010 320083e0 mov w0, #0x10001
0x00000000013ad014 aa0003e1 mov x1, x0
A quick example (cont …)
13
asm_.Mov(w0, 0x10002);
asm_.Mov(x1, x0);
§  Will output:
0x0000000000f3f010 52800040 mov w0, #0x2
0x0000000000f3f014 72a00020 movk w0, #0x1, lsl #16
0x0000000000f3f018 aa0003e1 mov x1, x0
§  A lot more examples (and surely more complex) are available in the example directory
Another one using the macro assembler
14
VIXL’s Simulator
§  Able to simulate whatever
instructionVIXL can assemble
§  Execution and register trace
output available
§  Extensive back-to-back testing
against hardware
§  Printf!
15
§  Because everything is simulated
§  Every instruction executed is traced
§  Every register update is traced
§  Every memory load/store, with address information, is checked
§  Can be seen as slow
§  No, it’s not! if run on many cores, at let’s say 3 or 4Ghz, it will be fast!
VIXL Simulator (cont)
16
VIXL’s Debugger
§  gdb with fewer commands
§  p for print, x for examine, si to execute
the current instruction
MacroAssembler masm(assm_buf, BUF_SIZE);
Decoder decoder;
Debugger debugger(&decoder);
…
// Generate the code for the example function.
Label start;
masm.Bind(&start);
masm.Brk();
masm.Nop();
. . .
debugger.RunFrom(
masm.GetLabelAddress<Instruction*>(&start));
Hit breakpoint at pc=0x7ffe93ce2a40.
Next: 0x00007ffe93ce2a40 d4200000 brk #0x0
vixl> si
Next: 0x00007ffe93ce2a48 14000002 b #+0x8 (addr
0x7ffe93ce2a50)
vixl>
Next: 0x00007ffe93ce2a50 d2800f61 mov x1, #0x7b
vixl>
Next: 0x00007ffe93ce2a54 d2803902 mov x2, #0x1c8
vixl>
Next: 0x00007ffe93ce2a58 8b020020 add x0, x1, x2
vixl>
Next: 0x00007ffe93ce2a5c d65f03c0 ret
vixl> p x1
x1 = 000000000000007b
vixl> p x2
x2 = 00000000000001c8
vixl> p x0
x0 = 0000000000000243
vixl> c
17
§  The disassembler and simulator take action based on a common instruction decoder
§  They use a visitor pattern
§  For each instruction, call the visitor methods of all registered classes
§  VisitAddSubImmediate()
§  VisitDaraProcessing3Source()
§  Classes associated with instruction decoding implement this visitor interface
§  Simulator
§  Disassembler
§  Instrumentation
§  Add your own visitors to get reports on what instructions have been encountered
Decoders
18
§  Most projects only use part ofVIXL
§  Android’s ART uses the assembler and the disassembler
§  QEMU uses the disassembler
§  GoogleV8 and Mozilla use everything
§  The simulator is used to run tests on many fast cores
§  The components are useful in isolation
§  We have already produced small command line tools for convenience, like a64disasm
Hacking withVIXL
19
§  UseVIXL to generate static code from C++, produce an object, and link it into the final
executable
§  PlugVIXL into elfio to make a programmable assembler
§  Like an inline assembler, but more flexible
§  Like intrinsics, but for all instructions
§  Example of an inner loop of an image processing operation:
Bind(&loop);
Ldrb(value, MemOperand(data));
Mul(value, value, coeff);
Lsr(value, value, 8);
Strb(value, MemOperand(data, 1, PostIndex));
Sub(length, length, 1);
Cbnz(length, &loop);
VIXL as a programmable assembler
20
§  Generate the code for different values of coeff
§  Same code sequence can produce special cases for each value
§  Create a symbol for each of the generated functions using elfio
symbols.add_symbol(strings, fn_name, fn_addr, fn_size, STB_GLOBAL,
STB_FUNC, 0, text_sec->get_index);
§  Build the programmable assembler
§  Run it to produce objects that can be linked into the rest of your project
§  Like GAS, but more flexible
§  Or wait from inside your app, generate the function upon request, and call it
§  You have created a dynamic C++ template instantiation!
template <int8_t coeff> mullcoeff(int8_t *data);
VIXL as a programmable assembler (2)
21
Function mul(MacroAssembler& asm_, uint8_t coeff) {
ptrdiff_t fn_start= asm_.CursorOffset();
Label mul;
asm_.Bind(&mul);
Label loop;
asm_.Bind(&loop);
asm_.Ldrb(w11, MemOperand(x0));
asm_.Mul(w11, w11, w1);
asm_.Lsr(w11, w11, 8);
asm_.Strb(w11, MemOperand(x0, 1, PostIndex));
asm_.Ret();
return Function(mul.location(), asm_.CursorOffset() - fn_start);
}
Dynamic coding example
22
§  The obvious cases
if (coeff != 1) {
Label loop;
asm_.Bind(&loop);
if (coeff == 0) {
asm_.Strb(wzr, MemOperand(x0, 1, PostIndex));
asm_.Sub(x1, x1, 1);
asm_.Cbnz(x1, &loop);
} else {
…
}
}
asm_.Ret();
Dynamic coding example (cont…)
23
mul_0:
0x1fd2010 3800141f strb wzr, [x0], #1
0x1fd2014 d1000421 sub x1, x1, #0x1 (1)
0x1fd2018 b5ffffc1 cbnz x1, #-0x8 (addr 0x1fd2010)
0x1fd201c d65f03c0 ret
mul_1:
0x1fd2020 d65f03c0 ret
Dynamic coding example (cont…)
24
§  What if coeff is a power of 2?
Label loop;
asm_.Bind(&loop);
asm_.Ldrb(w11, MemOperand(x0));
if (IsPowerOf2(coeff)) {
unsigned pow2= CountTrailingZeros(coeff);
asm_.Ubfx(w11, w11, 8 – pow2, pow2);
} else {
…
}
Dynamic coding example (cont…)
25
mul_2:
0x1fd2024 3940000b ldrb w11, [x0]
0x1fd2028 53077d6b ubfx w11, w11, #7, #1
0x1fd202c 3800140b strb w11, [x0], #1
0x1fd2030 d1000421 sub x1, x1, #0x1 (1)
0x1fd2034 b5ffff81 cbnz x1, #-0x10 (addr 0x1fd2024)
0x1fd2038 d65f03c0 ret
Dynamic coding example (cont…)
26
int main(int argc, char ** argv) {
Function jumptable[255];
const size_t bufSize = 1024;
uint8_t* buffer = new uint8_t[bufSize];
MacroAssembler asm_(buffer, bufSize);
jumptable[0] = mul(asm_, 0);
jumptable[1] = mul(asm_, 1);
jumptable[2] = mul(asm_, 2);
jumptable[11] = mul(asm_, 11);
asm_.FinalizeCode();
}
§  jumpTable can also be an std::set and upper_bound can be used
§  Because jumpTable[11] is the same as jumpTable[12]
Dynamic coding example (cont…)
27
§  To test your CPU by brute force
§  Execute a constrained random instruction stream, and see what breaks
§  UseVIXL to generate this on the target under test rather than ahead of time
§  Generate random 32bit values, and useVIXL to decide if the instruction is valid before
executing natively
§  Compare observable state after an instruction sequence between simulator and native,
and detect deviation
§  The simulator can be compiled for AArch64, so simulated and native instructions can be run in the
same environment
§  Use simulator feedback to inform decisions about what to generate
§  Check address register is legal for generating memory access ops
§  Verify loops can exit in a reasonable amount of time
Random instruction set testing
28
§  JITs: JavaScript, Java, Python, other scripting languages
§  Dynamic code generation of optimized routine
§  Testing
§  Random Instruction Stream (RIS) testing
§  Toolchain testing
§  ISA experimentation: try out features of ARM’s AArch64
§  Simple, fast, tested API
§  Integrated suite, ready to use on a new JIT project
§  Teaching tool using a parsing expression grammar tool like PEG.js
§  Turn this JSON representation
{“mnemonic”:”mov”,“destination”:{“type”:”x”,“index”:1}, ...
§  Into a Mov(x1, …) can be done in a matter of hours
Where to useVIXL
29
§  VIXL1.8 introduced a few more things:
§  Full NEON support
§  Support for long branches
§  Improved handling of literal pools.
§  Support some `ic` and `dc` cache op instructions.
§  Support CRC32 instructions.
§  Support half-precision floating point instructions.
§  MacroAssembler support for `bfm`, `ubfm` and `sbfm`.
§  Other small bug fixes and improvements.
§  We are now at 1.10 (July 2015)
§  improved literal handling,
§  a better build and test infrastructure,
§  And bug fixes
What’s new inVIXL
30
§  Vixl is a toolkit
§  VIXL does the boring bits for you
§  VIXL is available on github
§  https://github.com/armvixl/vixl
§  The license is a permissive free software license equivalent to the BSD 3-Clause license
§  VIXL is maintained and developed
§  We are now (since July 2015) at 1.10
§  Supported by ARM
§  … and extended
§  VIXL ( = LXIV, ie 64 in roman numerals) for Aarch32 is coming CY2016
§  A good reading start:
◦  https://github.com/armvixl/vixl/blob/master/README.md
Conclusion

More Related Content

What's hot

Работа с реляционными базами данных в C++
Работа с реляционными базами данных в C++Работа с реляционными базами данных в C++
Работа с реляционными базами данных в C++
corehard_by
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
Sergey Platonov
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
Platonov Sergey
 
暗認本読書会4
暗認本読書会4暗認本読書会4
暗認本読書会4
MITSUNARI Shigeo
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
DevGAMM Conference
 
12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine
ChengHui Weng
 
200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience
Andrey Karpov
 
Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >
Sergey Platonov
 
[CB16] The ARMs race for kernel protection by Jonathan Levin
[CB16] The ARMs race for kernel protection by Jonathan Levin[CB16] The ARMs race for kernel protection by Jonathan Levin
[CB16] The ARMs race for kernel protection by Jonathan Levin
CODE BLUE
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
Коварный code type ITGM #9
Коварный code type ITGM #9Коварный code type ITGM #9
Коварный code type ITGM #9
Andrey Zakharevich
 
Checking Oracle VM VirtualBox. Part 2
Checking Oracle VM VirtualBox. Part 2Checking Oracle VM VirtualBox. Part 2
Checking Oracle VM VirtualBox. Part 2
Andrey Karpov
 
The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)jeffz
 
Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。
Mr. Vengineer
 
ITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
ITGM #9 - Коварный CodeType, или от segfault'а к работающему кодуITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
ITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
delimitry
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
Sergey Platonov
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)jeffz
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1
ArcBlock
 
Checking Oracle VM VirtualBox. Part 1
Checking Oracle VM VirtualBox. Part 1Checking Oracle VM VirtualBox. Part 1
Checking Oracle VM VirtualBox. Part 1
Andrey Karpov
 
Clang tidy
Clang tidyClang tidy
Clang tidy
Yury Yafimachau
 

What's hot (20)

Работа с реляционными базами данных в C++
Работа с реляционными базами данных в C++Работа с реляционными базами данных в C++
Работа с реляционными базами данных в C++
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
 
暗認本読書会4
暗認本読書会4暗認本読書会4
暗認本読書会4
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
 
12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine
 
200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience200 Open Source Projects Later: Source Code Static Analysis Experience
200 Open Source Projects Later: Source Code Static Analysis Experience
 
Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >
 
[CB16] The ARMs race for kernel protection by Jonathan Levin
[CB16] The ARMs race for kernel protection by Jonathan Levin[CB16] The ARMs race for kernel protection by Jonathan Levin
[CB16] The ARMs race for kernel protection by Jonathan Levin
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
Коварный code type ITGM #9
Коварный code type ITGM #9Коварный code type ITGM #9
Коварный code type ITGM #9
 
Checking Oracle VM VirtualBox. Part 2
Checking Oracle VM VirtualBox. Part 2Checking Oracle VM VirtualBox. Part 2
Checking Oracle VM VirtualBox. Part 2
 
The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)
 
Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。
 
ITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
ITGM #9 - Коварный CodeType, или от segfault'а к работающему кодуITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
ITGM #9 - Коварный CodeType, или от segfault'а к работающему коду
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1
 
Checking Oracle VM VirtualBox. Part 1
Checking Oracle VM VirtualBox. Part 1Checking Oracle VM VirtualBox. Part 1
Checking Oracle VM VirtualBox. Part 1
 
Clang tidy
Clang tidyClang tidy
Clang tidy
 

Similar to SFO15-500: VIXL

Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linuxAjin Abraham
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
amiable_indian
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01
Hajime Tazaki
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
Moabi.com
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
Tomer Zait
 
Vc4c development of opencl compiler for videocore4
Vc4c  development of opencl compiler for videocore4Vc4c  development of opencl compiler for videocore4
Vc4c development of opencl compiler for videocore4
nomaddo
 
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
Andrey Karpov
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
OOO "Program Verification Systems"
 
Buffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the StackBuffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the Stack
ironSource
 
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Vincenzo Iozzo
 
Heap overflows for humans – 101
Heap overflows for humans – 101Heap overflows for humans – 101
Heap overflows for humans – 101
Craft Symbol
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate Representation
Wei-Ren Chen
 
Shellcode Disassembling - Reverse Engineering
Shellcode Disassembling - Reverse EngineeringShellcode Disassembling - Reverse Engineering
Shellcode Disassembling - Reverse Engineering
Sumutiu Marius
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protections
Jonathan Salwan
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
John Lee
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
Shakacon
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
NodeXperts
 
FPGA design with CλaSH
FPGA design with CλaSHFPGA design with CλaSH
FPGA design with CλaSHConrad Parker
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overview
Linaro
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5PRADEEP
 

Similar to SFO15-500: VIXL (20)

Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linux
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Vc4c development of opencl compiler for videocore4
Vc4c  development of opencl compiler for videocore4Vc4c  development of opencl compiler for videocore4
Vc4c development of opencl compiler for videocore4
 
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
 
Buffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the StackBuffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the Stack
 
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
Post Exploitation Bliss: Loading Meterpreter on a Factory iPhone, Black Hat U...
 
Heap overflows for humans – 101
Heap overflows for humans – 101Heap overflows for humans – 101
Heap overflows for humans – 101
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate Representation
 
Shellcode Disassembling - Reverse Engineering
Shellcode Disassembling - Reverse EngineeringShellcode Disassembling - Reverse Engineering
Shellcode Disassembling - Reverse Engineering
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protections
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
FPGA design with CλaSH
FPGA design with CλaSHFPGA design with CλaSH
FPGA design with CλaSH
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overview
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5
 

More from Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Linaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Linaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
Linaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

More from Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

SFO15-500: VIXL

  • 2. 2 §  What isVIXL? §  What is it used for? §  What’s new inVIXL? §  Conclusion & Q&A Agenda
  • 3. 3 §  A Runtime code-generation library §  for ARM AArch64 now, AArch32 (Arm and Thumb-2) coming CY2016 §  A program driven assembler, macro assembler, disassembler, simulator and debugger §  Developed as the code generator for the GoogleV8 JavaScript AArch64 port §  Available through GitHub §  https://github.com/armvixl/vixl §  Supports most of the instruction set §  At EL1 (usertime) §  With full NEON support §  Used by a number of projects §  Android’s ART, QEMU, HipHop, Mozilla, and more! What isVIXL
  • 4. 4 VIXL’s Assembler §  Example of a loop: mov x0, 10 loop: subs x0, x0, 1 bne loop §  VIXL Label loop; mov(x0, 10); Bind(&loop); subs(x0, x0, 1); b(&loop, ne);
  • 5. 5 §  Example of generating NEON code: Ld1(v0.V8B, v1.V8B(), MemOperand(x0)); Saddl(v0.V8H(), v0.V8B(), v1.V8B()); Addv(h0, v0.V8H()); §  Will produce this code: ld1 {v0.8b, v1.8b}, [x0] saddl v0.8h, v0.8b, v1.8b addv h0, v0.8h §  Register methods (here, for exampleV8H()) determine §  the number of lanes (8) §  and size of the register (D or Q) (8*16bit = 128bits = Q) NEON support in the assembler
  • 6. 6 §  WhileVIXL’s Assembler will generate one instruction, the MacroAssembler gives you a lot more flexibility §  AArch64 uses modified immediates ◦  mov r0, 0x10001 is permitted ◦  mov r0, 0x10002 is not! §  MacroAssembler::Mov(r0, 0x10002) will do the job for you, using a pair of movz/movk or whatever combination of instructions necessary §  The MacroAssembler ultimately calls the Assembler §  Simplifies your code without a deep knowledge of ARM AArch64 §  Sometimes it might optimize your code §  But it’s still an assembler, not a compiler! VIXL’s MacroAssembler
  • 7. 7 §  Will perform simple tricks to shorten your generated code §  For example: Add(w0, w0, 0x10002); §  Will generate: mov w16, #0x8001 add x0, x0, w16, lsl #1 §  Instead of the usual movz/movk for 0x10002 VIXL’s MacroAssembler (2)
  • 8. 8 §  In a JIT environment, simply run it §  Natively, §  Or Simulated §  Save it for future reuse §  Or generate an ELF file using elfio and link it to your application §  Create a symbol for the generated functions using elfio Elf_Word add_symbol(string_section_accessor& pStrWriter, const char* str, Elf64_Addr value, Elf_Xword size, unsigned char info, unsigned char other, Elf_Half shndx ); symbols.add_symbol( strings, fn_name, fn_addr, fn_size, STB_GLOBAL, STB_FUNC, 0, text_sec->get_index); §  ELFio is available here: http://elfio.sourceforge.net What to do with the generated code
  • 9. 9 §  The headers #include <stdio.h> #include "vixl/a64/assembler-a64.h" #include "vixl/a64/disasm-a64.h" using namespace vixl; A quick example
  • 10. 10 int main(int argc, char ** argv) { const size_t bufSize = 1024; uint8_t* buffer = new uint8_t[bufSize]; Assembler asm_(buffer, bufSize); asm_.orr(w0, wzr, 0x10001); asm_.mov(x1, x0); asm_.FinalizeCode(); BufferDisassembler disasm_(buffer, asm_.CursorOffset()); } A quick example (cont …)
  • 11. 11 class BufferDisassembler { Decoder decoder_; PrintDisassembler disasm_; public: BufferDisassembler( uint8_t* buffer, size_t size) : disasm_(stdout) { decoder_.AppendVisitor(&disasm_); uint32_t* instr = reinterpret_cast<uint32_t*>(buffer); for (; size > 0; size -= 4, instr++) { decoder_.Decode( reinterpret_cast<Instruction*>(instr)); } } }; A quick example (cont …)
  • 12. 12 §  Will output 0x00000000013ad010 320083e0 mov w0, #0x10001 0x00000000013ad014 aa0003e1 mov x1, x0 A quick example (cont …)
  • 13. 13 asm_.Mov(w0, 0x10002); asm_.Mov(x1, x0); §  Will output: 0x0000000000f3f010 52800040 mov w0, #0x2 0x0000000000f3f014 72a00020 movk w0, #0x1, lsl #16 0x0000000000f3f018 aa0003e1 mov x1, x0 §  A lot more examples (and surely more complex) are available in the example directory Another one using the macro assembler
  • 14. 14 VIXL’s Simulator §  Able to simulate whatever instructionVIXL can assemble §  Execution and register trace output available §  Extensive back-to-back testing against hardware §  Printf!
  • 15. 15 §  Because everything is simulated §  Every instruction executed is traced §  Every register update is traced §  Every memory load/store, with address information, is checked §  Can be seen as slow §  No, it’s not! if run on many cores, at let’s say 3 or 4Ghz, it will be fast! VIXL Simulator (cont)
  • 16. 16 VIXL’s Debugger §  gdb with fewer commands §  p for print, x for examine, si to execute the current instruction MacroAssembler masm(assm_buf, BUF_SIZE); Decoder decoder; Debugger debugger(&decoder); … // Generate the code for the example function. Label start; masm.Bind(&start); masm.Brk(); masm.Nop(); . . . debugger.RunFrom( masm.GetLabelAddress<Instruction*>(&start)); Hit breakpoint at pc=0x7ffe93ce2a40. Next: 0x00007ffe93ce2a40 d4200000 brk #0x0 vixl> si Next: 0x00007ffe93ce2a48 14000002 b #+0x8 (addr 0x7ffe93ce2a50) vixl> Next: 0x00007ffe93ce2a50 d2800f61 mov x1, #0x7b vixl> Next: 0x00007ffe93ce2a54 d2803902 mov x2, #0x1c8 vixl> Next: 0x00007ffe93ce2a58 8b020020 add x0, x1, x2 vixl> Next: 0x00007ffe93ce2a5c d65f03c0 ret vixl> p x1 x1 = 000000000000007b vixl> p x2 x2 = 00000000000001c8 vixl> p x0 x0 = 0000000000000243 vixl> c
  • 17. 17 §  The disassembler and simulator take action based on a common instruction decoder §  They use a visitor pattern §  For each instruction, call the visitor methods of all registered classes §  VisitAddSubImmediate() §  VisitDaraProcessing3Source() §  Classes associated with instruction decoding implement this visitor interface §  Simulator §  Disassembler §  Instrumentation §  Add your own visitors to get reports on what instructions have been encountered Decoders
  • 18. 18 §  Most projects only use part ofVIXL §  Android’s ART uses the assembler and the disassembler §  QEMU uses the disassembler §  GoogleV8 and Mozilla use everything §  The simulator is used to run tests on many fast cores §  The components are useful in isolation §  We have already produced small command line tools for convenience, like a64disasm Hacking withVIXL
  • 19. 19 §  UseVIXL to generate static code from C++, produce an object, and link it into the final executable §  PlugVIXL into elfio to make a programmable assembler §  Like an inline assembler, but more flexible §  Like intrinsics, but for all instructions §  Example of an inner loop of an image processing operation: Bind(&loop); Ldrb(value, MemOperand(data)); Mul(value, value, coeff); Lsr(value, value, 8); Strb(value, MemOperand(data, 1, PostIndex)); Sub(length, length, 1); Cbnz(length, &loop); VIXL as a programmable assembler
  • 20. 20 §  Generate the code for different values of coeff §  Same code sequence can produce special cases for each value §  Create a symbol for each of the generated functions using elfio symbols.add_symbol(strings, fn_name, fn_addr, fn_size, STB_GLOBAL, STB_FUNC, 0, text_sec->get_index); §  Build the programmable assembler §  Run it to produce objects that can be linked into the rest of your project §  Like GAS, but more flexible §  Or wait from inside your app, generate the function upon request, and call it §  You have created a dynamic C++ template instantiation! template <int8_t coeff> mullcoeff(int8_t *data); VIXL as a programmable assembler (2)
  • 21. 21 Function mul(MacroAssembler& asm_, uint8_t coeff) { ptrdiff_t fn_start= asm_.CursorOffset(); Label mul; asm_.Bind(&mul); Label loop; asm_.Bind(&loop); asm_.Ldrb(w11, MemOperand(x0)); asm_.Mul(w11, w11, w1); asm_.Lsr(w11, w11, 8); asm_.Strb(w11, MemOperand(x0, 1, PostIndex)); asm_.Ret(); return Function(mul.location(), asm_.CursorOffset() - fn_start); } Dynamic coding example
  • 22. 22 §  The obvious cases if (coeff != 1) { Label loop; asm_.Bind(&loop); if (coeff == 0) { asm_.Strb(wzr, MemOperand(x0, 1, PostIndex)); asm_.Sub(x1, x1, 1); asm_.Cbnz(x1, &loop); } else { … } } asm_.Ret(); Dynamic coding example (cont…)
  • 23. 23 mul_0: 0x1fd2010 3800141f strb wzr, [x0], #1 0x1fd2014 d1000421 sub x1, x1, #0x1 (1) 0x1fd2018 b5ffffc1 cbnz x1, #-0x8 (addr 0x1fd2010) 0x1fd201c d65f03c0 ret mul_1: 0x1fd2020 d65f03c0 ret Dynamic coding example (cont…)
  • 24. 24 §  What if coeff is a power of 2? Label loop; asm_.Bind(&loop); asm_.Ldrb(w11, MemOperand(x0)); if (IsPowerOf2(coeff)) { unsigned pow2= CountTrailingZeros(coeff); asm_.Ubfx(w11, w11, 8 – pow2, pow2); } else { … } Dynamic coding example (cont…)
  • 25. 25 mul_2: 0x1fd2024 3940000b ldrb w11, [x0] 0x1fd2028 53077d6b ubfx w11, w11, #7, #1 0x1fd202c 3800140b strb w11, [x0], #1 0x1fd2030 d1000421 sub x1, x1, #0x1 (1) 0x1fd2034 b5ffff81 cbnz x1, #-0x10 (addr 0x1fd2024) 0x1fd2038 d65f03c0 ret Dynamic coding example (cont…)
  • 26. 26 int main(int argc, char ** argv) { Function jumptable[255]; const size_t bufSize = 1024; uint8_t* buffer = new uint8_t[bufSize]; MacroAssembler asm_(buffer, bufSize); jumptable[0] = mul(asm_, 0); jumptable[1] = mul(asm_, 1); jumptable[2] = mul(asm_, 2); jumptable[11] = mul(asm_, 11); asm_.FinalizeCode(); } §  jumpTable can also be an std::set and upper_bound can be used §  Because jumpTable[11] is the same as jumpTable[12] Dynamic coding example (cont…)
  • 27. 27 §  To test your CPU by brute force §  Execute a constrained random instruction stream, and see what breaks §  UseVIXL to generate this on the target under test rather than ahead of time §  Generate random 32bit values, and useVIXL to decide if the instruction is valid before executing natively §  Compare observable state after an instruction sequence between simulator and native, and detect deviation §  The simulator can be compiled for AArch64, so simulated and native instructions can be run in the same environment §  Use simulator feedback to inform decisions about what to generate §  Check address register is legal for generating memory access ops §  Verify loops can exit in a reasonable amount of time Random instruction set testing
  • 28. 28 §  JITs: JavaScript, Java, Python, other scripting languages §  Dynamic code generation of optimized routine §  Testing §  Random Instruction Stream (RIS) testing §  Toolchain testing §  ISA experimentation: try out features of ARM’s AArch64 §  Simple, fast, tested API §  Integrated suite, ready to use on a new JIT project §  Teaching tool using a parsing expression grammar tool like PEG.js §  Turn this JSON representation {“mnemonic”:”mov”,“destination”:{“type”:”x”,“index”:1}, ... §  Into a Mov(x1, …) can be done in a matter of hours Where to useVIXL
  • 29. 29 §  VIXL1.8 introduced a few more things: §  Full NEON support §  Support for long branches §  Improved handling of literal pools. §  Support some `ic` and `dc` cache op instructions. §  Support CRC32 instructions. §  Support half-precision floating point instructions. §  MacroAssembler support for `bfm`, `ubfm` and `sbfm`. §  Other small bug fixes and improvements. §  We are now at 1.10 (July 2015) §  improved literal handling, §  a better build and test infrastructure, §  And bug fixes What’s new inVIXL
  • 30. 30 §  Vixl is a toolkit §  VIXL does the boring bits for you §  VIXL is available on github §  https://github.com/armvixl/vixl §  The license is a permissive free software license equivalent to the BSD 3-Clause license §  VIXL is maintained and developed §  We are now (since July 2015) at 1.10 §  Supported by ARM §  … and extended §  VIXL ( = LXIV, ie 64 in roman numerals) for Aarch32 is coming CY2016 §  A good reading start: ◦  https://github.com/armvixl/vixl/blob/master/README.md Conclusion