GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — linux_syscall_hook/assembler/test.c at main · 3intermute/linux_syscall_hook

This repository was archived by the owner on Mar 19, 2023. It is now read-only.

Expand file tree

/

test.c

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
24 lines (20 loc) · 831 Bytes
/

test.c

Copy path

File metadata and controls

24 lines (20 loc) · 831 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <byteswap.h>
#define ABS_LOAD_INS_COUNT 4
uint32_t assemble_movk(uint32_t imm16, uint32_t hw, uint32_t rd) {
return 0xf2800000 | (imm16 << 5) | (hw << 21) | rd;
}
void assemble_absolute_load(uint32_t rd, uintptr_t addr, uint32_t *arr) {
arr[0] = __bswap_32(assemble_movk(addr & 0xffff, 0b0, rd));
arr[1] = __bswap_32(assemble_movk((addr & 0xffff0000) >> 16, 0b1, rd));
arr[2] = __bswap_32(assemble_movk((addr & 0xffff00000000) >> 32, 0b10, rd));
arr[3] = __bswap_32(assemble_movk((addr & 0xffff000000000000) >> 48, 0b11, rd));
}
int main(void) {
uint32_t arr[ABS_LOAD_INS_COUNT];
// printf("%x\n", assemble_movk(0xffffd8589fcc0000 & 0xffff, 0b1, 0b0));
// assemble_absolute_load(0b0, 0xffffd8589fcc0000, &arr);
return 0;
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.