mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
asm: more links
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
/* 1 + 2 == 3 */
|
||||
/* 1 + 2 == 3
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* Increment a variable in inline assembly. */
|
||||
/* Increment a variable in inline assembly.
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://stackoverflow.com/questions/53960240/armv8-floating-point-output-inline-assembly */
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly-floating-point-arm */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* ....
|
||||
* ldr r0, [sp]
|
||||
* ....
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* movt r3, #<higher address part>
|
||||
* ldr r0, [r3]
|
||||
* ....
|
||||
*
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* https://github.com/cirosantilli/arm-assembly-cheat#register-variables */
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#inline-assembly-register-variables */
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -17,7 +17,7 @@ ENTRY
|
||||
/* r0 is first argument. */
|
||||
ldr r0, =puts_s
|
||||
bl puts
|
||||
/* Check exit statut >= 0 for success. */
|
||||
/* Check exit status >= 0 for success. */
|
||||
cmp r0, 0
|
||||
ASSERT(bge)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly-c-standard-library */
|
||||
|
||||
#ifndef COMMON_ARCH_H
|
||||
#define COMMON_ARCH_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user