Skip to content

Instantly share code, notes, and snippets.

View xiangzhai's full-sized avatar
♥️
Wuhan ❤️ Anshan

Leslie Zhai xiangzhai

♥️
Wuhan ❤️ Anshan
View GitHub Profile
#include <stdio.h>
struct foo {
unsigned char bar[8];
};
int main(int argc, char *argv[]) {
struct foo x = {0, 1, 2, 3, 4, 5, 6, 7};
unsigned int *p = (unsigned int *)(x.bar + 3);
int i;
@xiangzhai
xiangzhai / Disable-loongson3a-fix-by-default.patch
Last active September 27, 2018 03:41
Do not enable loongson3 fixes by default
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index a221800..9a173b9 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -940,14 +940,17 @@ static int mips_fix_rm7000;
static bfd_boolean mips_fix_cn63xxp1;
/* ...likewise -mfix-loongson3-llsc
- * Default is add sync before ll/lld
- * So make the default value as one.
@xiangzhai
xiangzhai / Backport-refactory-loongson-march-and-LoongISA-to-binutils-2.30.patch
Last active September 25, 2018 07:31
Backport refactory loongson march and LoongISA to binutils-2.30
Author: Leslie Zhai <zhaixiang@loongson.cn>
Date: Tue Sep 25 15:29:31 2018 +0800
Backport refactory loongson march and LoongISA to binutils-2.30
diff --git a/bfd/archures.c b/bfd/archures.c
index e83c57a..8e65a3d 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -193,7 +193,9 @@ DESCRIPTION
@xiangzhai
xiangzhai / Backport-reorganize-the-loongson-march-and-extensions-instructions-set-to-gcc-8.1.0.patch
Last active September 25, 2018 06:11
Backport reorganize the loongson march and extensions instructions set to gcc-8.1.0
Author: Leslie Zhai <zhaixiang@loongson.cn>
Date: Tue Sep 25 14:08:58 2018 +0800
Backport reorganize the loongson march and extensions instructions set to gcc-8.1.0
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a5defb0..067fdad 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -439,7 +439,7 @@ microblaze*-*-*)
@xiangzhai
xiangzhai / transcode-debug.txt
Created August 31, 2016 02:56
transcode ripping videodvd
Devices
-----------------------
ASUS SDRW-08D2S-U A601 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump] [%7]
System
-----------------------
K3b Version: 2.10.0
KDE Version: 5.25.0
Qt Version: 5.7.0
Kernel: 4.7.2-1-ARCH