mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Move all non-README links to cirosantilli.com where the file is not cut off...
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-add-vector-instruction
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-add-vector-instruction
|
||||
*
|
||||
* Add a bunch of integers in one go.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-beq-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-beq-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bfi-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bfi-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-cbz-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-cbz-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler-comments */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler-comments */
|
||||
|
||||
#include <lkmc.h>
|
||||
LKMC_PROLOGUE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-cset-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-cset-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-fadd-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-fadd-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-fadd-instruction
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-fadd-instruction
|
||||
*
|
||||
* Add a bunch of floating point numbers in one go.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* aarch64 freestanding Linux hello world
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#linux-system-calls
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#linux-system-calls
|
||||
*/
|
||||
|
||||
.text
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler data sizes */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler data sizes */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
https://github.com/cirosantilli/linux-kernel-module-cheat#gdb-tests
|
||||
https://cirosantilli.com/linux-kernel-module-cheat#gdb-tests
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler-immediates */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler-immediates */
|
||||
|
||||
#include <lkmc.h>
|
||||
LKMC_PROLOGUE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-early-clobbers */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-early-clobbers */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* aarch64 freestanding C inline assemby Linux hello world
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#linux-system-calls
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#linux-system-calls
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* The code is more complicated, and I was not able to get as efficient,
|
||||
* so better just stick to named register variables.
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#linux-system-calls
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#linux-system-calls
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Increment a variable in inline assembly.
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-floating-point-arm */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-floating-point-arm */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-calling-convention */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-calling-convention */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-ld2-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-ld2-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-movk-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-movk-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-movn-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-movn-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#assembly-registers */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#assembly-registers */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#assembly-registers */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#assembly-registers */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-ret-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-ret-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-str-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-str-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-sve */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-sve */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ubfm-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ubfm-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ubfx-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ubfx-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-udf-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-udf-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-x31-register */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-x31-register */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -28,7 +28,7 @@ LKMC_PROLOGUE
|
||||
|
||||
#if 0
|
||||
/* But we cannot omit the register if there is a shift when using .syntx unified:
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-shift-suffixes
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#arm-shift-suffixes
|
||||
*/
|
||||
.syntax unified
|
||||
/* Error: garbage following instruction */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-addressing-modes */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-addressing-modes */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-adr-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bitwise-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bitwise-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-b-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-b-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
LKMC_PROLOGUE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-beq-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-beq-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bfi-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bfi-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bic-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bic-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bl-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bl-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-bitwise-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-bitwise-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler-comments */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler-comments */
|
||||
|
||||
#include <lkmc.h>
|
||||
LKMC_PROLOGUE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-conditional-execution */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-conditional-execution */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ int main(void) {
|
||||
uint32_t cpsr_m;
|
||||
__asm__ ("mrs %0, cpsr" : "=r" (cpsr) : :);
|
||||
printf("CPSR 0x%" PRIX32 "\n", cpsr);
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-exception-levels */
|
||||
cpsr_m = cpsr & 0xF;
|
||||
printf("CPSR.M 0x%" PRIX32 "\n", cpsr_m);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* arm freestanding Linux hello world
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#linux-system-calls
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#linux-system-calls
|
||||
*/
|
||||
|
||||
.syntax unified
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-thumb-encoding */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-thumb-encoding */
|
||||
|
||||
.thumb_func
|
||||
.syntax unified
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler data sizes */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler data sizes */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
https://github.com/cirosantilli/linux-kernel-module-cheat#gdb-tests
|
||||
https://cirosantilli.com/linux-kernel-module-cheat#gdb-tests
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gnu-gas-assembler-immediates */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gnu-gas-assembler-immediates */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-loop-over-array */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-loop-over-array */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 1 + 2 == 3
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#linux-system-calls
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#linux-system-calls
|
||||
*
|
||||
* arm freestanding C inline assemby Linux hello world.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Increment a variable in inline assembly.
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-floating-point-arm */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-floating-point-arm */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* ldr r0, [sp]
|
||||
* ....
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* ldr r0, [r3]
|
||||
* ....
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#gcc-inline-assembly-register-variables */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldmia-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ldmia-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldr-pseudo-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ldr-pseudo-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldrh-and-ldrb-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ldrh-and-ldrb-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldrh-and-ldrb-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ldrh-and-ldrb-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-calling-convention */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-calling-convention */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-mov-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-mov-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-movw-and-movt-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-movw-and-movt-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
*
|
||||
* Multiplication.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-nop-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-nop-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-ldmia-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-ldmia-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
*
|
||||
* Reverse bit order.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#assembly-registers */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#assembly-registers */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
*
|
||||
* Reverse byte order.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-s-suffix */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-s-suffix */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-shift-suffixes */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-shift-suffixes */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-str-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-str-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -44,7 +44,7 @@ LKMC_PROLOGUE
|
||||
* but it will always segfault under Linux because the text segment is read-only.
|
||||
* This is however useful in baremetal programming.
|
||||
* This construct is not possible in ARMv8 for str:
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch64-str-instruction
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch64-str-instruction
|
||||
*/
|
||||
str r1, .Lvar_in_same_section
|
||||
.Lvar_in_same_section:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
*
|
||||
* Subtraction.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-thumb-encoding */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-thumb-encoding */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-data-processing-instructions
|
||||
*
|
||||
* Test. Same as ands, but don't store the result, just update flags.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-udf-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-udf-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-vadd-instruction
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-vadd-instruction
|
||||
* Adapted from: https://mindplusplus.wordpress.com/2013/06/27/arm-vfp-vector-programming-part-2-examples/ */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-vadd-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-vadd-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-vcvt-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-vcvt-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#armv8-aarch32-vcvta-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#armv8-aarch32-vcvta-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-vcvtr-instruction */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-vcvtr-instruction */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Please don't do anything, including crashing.
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly
|
||||
*/
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* See what happens on test failure with LKMC_ASSERT_FAIL.
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly
|
||||
* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly
|
||||
*/
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-binary-arithmetic-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-binary-arithmetic-instructions
|
||||
*
|
||||
* Add with Carry. Like add, but if the carry flag is set, add 1 to the addition.
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#userland-assembly */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-sse-packed-arithmetic-instructions
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-sse-packed-arithmetic-instructions
|
||||
*
|
||||
* Add a few floating point numbers in one go (P == packaged).
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-addressing-modes */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-addressing-modes */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-logical-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-logical-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#your-first-binutils-hack */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#your-first-binutils-hack */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#your-first-binutils-hack */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#your-first-binutils-hack */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-data-transfer-instructions */
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-data-transfer-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user