beqz s0, 1f
Expands tobeq s0, x0, 1f
jump to label1f
if s0 == x0. Note that label1f
means to go to numeric label 1 FORWARD of the given position whose opposite is label1b
meaning to go to numeric label 1 BACKWARD of the given position.csrrw t3, CSR_SSCRATCH, a0
Write the value in the csr registerCSR_SSCRATCH
tot3
register and write the value ina0
back toCSR_SSCRATCH
jal purgatory
Expands tojal x1, purgatory
and unconditionally jump to functionpurgatory()
and write PC+4 into x1 (return address) registerjal t0, .Lbyte_copy_until_aligned_forward
Write PC+4 into registert0
and unconditionally jump to label.Lbyte_copy_until_aligned_forward
.jalr s0
Expands tojalr x1, s0, 0
meaning the target address to jump to iss0 + 0
and write PC+4 into x1 (return address) register
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFAICT | As far as I can tell | 个人认为 | |
---|---|---|---|
AFAIK | As far as I know | 据我了解 | |
AFAIU | As far as I understand | 按我理解 | |
BTW | By the way | 顺便 | |
FWIW | For what it's worth | 陈述见解或建议的谦逊说法,比如我觉得这是有用的信息,但是从听者的角度未必也是 | |
FYI | For your information | 供您参考 | |
HTH | Hope this helps | 希望奏效 | |
IDK | I don't know | 我不知道 | |
IIRC | If I recall correctly / If I remember correctly | 如果我没有记错 | |
IMHO | In my humble opinion | 在下愚见 |
-
ldp x0, x1, [sp, #0x10]
load values from sp+0x10 into x0, x1 respectively -
svc #0x0
trigger SuperVisor Call exception, used to implement syscall, 0x0 is an argument passed into the exception handler (sw intr handler in linux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ulimit -a | |
-t: cpu time (seconds) unlimited | |
-f: file size (blocks) unlimited | |
-d: data seg size (kbytes) unlimited | |
-s: stack size (kbytes) 8192 | |
-c: core file size (blocks) 0 | |
-m: resident set size (kbytes) unlimited | |
-u: processes 31178 | |
-n: file descriptors 1024 | |
-l: locked-in-memory size (kbytes) 65536 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
for c in `ls /sys/bus/cpu/devices/cpu[^0]*/online`; do | |
echo $1 > $c # 2> /dev/null # delete the first comment sign # in this line if you care about what's wrong. | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git remote -v | |
amd git@gitlab.freedesktop.org:agd5f/linux.git (fetch) | |
amd git@gitlab.freedesktop.org:agd5f/linux.git (push) | |
drm git://anongit.freedesktop.org/drm/drm (fetch) | |
drm git://anongit.freedesktop.org/drm/drm (push) | |
drm-misc git://anongit.freedesktop.org/drm/drm-misc (fetch) | |
drm-misc git://anongit.freedesktop.org/drm/drm-misc (push) | |
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (fetch) | |
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (push) | |
riscv git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git (fetch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set from="luc@sietium.com" | |
set realname="Luc Ma" | |
# ==================== IMAP ============================= | |
set imap_user = "onion0709@gmail.com" | |
# git-send-email | |
# set imap_pass = "xxxx xxxx xxxx xxxx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log -L"/^VERSION = /,/^NAME = /:Makefile" --pretty="%h" --no-patch | | |
while read revision; do git show "$revision":Makefile | | |
sed -n -e '/^VERSION = [0-9]/ { N; N; N; N; s/\n/ /g; p }' | | |
sed -e 's/VERSION = //' -e 's/ PATCHLEVEL = /./' -e 's/ SUBLEVEL = /./' -e 's/ EXTRAVERSION = *//' -e 's/NAME/ NAME/'; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "#include <stdio.h>\nint main() { int a = sizeof(struct {}); printf(\"a = %d\\\n\", a); }" | gcc -x c - | |
# a = 0 | |
echo "#include <stdio.h>\nint main() { int a = sizeof(struct {}); printf(\"a = %d\\\n\", a); }" | gcc -x c++ - | |
# <stdin>:2:36: error: types may not be defined in ‘sizeof’ expressions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -name 'ARB-*.md' -printf '%P\n' | awk '{orig=$0; gsub(/-/, "_"); print "mv", orig, $0}' | bash | |
# notes | |
# | |
# -printf '%P\n' to strip preceding './' from find's output | |
# orig=$0 to save original file name | |
# gsub(/-/, "_") to subsititue '-' in the original file name to '_' in the target file name, it happens to '$0' in place | |
# print "mv", orig, $0 to generate shell command |
NewerOlder