Skip to content

Instantly share code, notes, and snippets.

View cyyself's full-sized avatar

Yangyu Chen cyyself

View GitHub Profile
.text
.globl _start
.globl poweroff
_start:
csrr a0, mhartid
bnez a0, poweroff
print_mtvec:
li a0, 0x61
jal uart_print
csrr a3, mtvec
@cyyself
cyyself / gist:5cd6d9788239e988b0cf036c85965249
Created January 6, 2023 09:23
gcc_11_2_bug_example.cpp
This file has been truncated, but you can view the full file.
# 0 "Vmycpu_top___024root__DepSet_hcf0db31f__0.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "Vmycpu_top___024root__DepSet_hcf0db31f__0.cpp"
void debug_eth_print_mac_caps(unsigned long caps) {
if (caps == (~0)) {
printk(KERN_INFO "Internal\n");
}
else {
if (caps & MAC_SYM_PAUSE) printk(KERN_INFO "Has MAC_SYM_PAUSE 0x%x\n", MAC_SYM_PAUSE);
if (caps & MAC_ASYM_PAUSE) printk(KERN_INFO "Has MAC_ASYM_PAUSE 0x%x\n", MAC_ASYM_PAUSE);
if (caps & MAC_2500FD) printk(KERN_INFO "Has MAC_2500FD 0x%x\n", MAC_2500FD);
if (caps & MAC_1000FD) printk(KERN_INFO "Has MAC_1000FD 0x%x\n", MAC_1000FD);
void mtk_eth_soc_debug_validate(struct phylink_config *config,
unsigned long *supported,
struct phylink_link_state *state)
{
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
phylink_set_port_modes(mask);
phylink_set(mask, Autoneg);
phylink_get_linkmodes(mask, PHY_INTERFACE_MODE_2500BASEX, config->mac_capabilities);
// Golden Gate-generated Driver Header
// This contains target-specific preprocessor macro definitions,
// and encodes all required bridge metadata to instantiate bridge drivers.
#ifdef GET_INCLUDES
#include "bridges/master.h"
#endif // GET_INCLUDES
#ifdef GET_SUBSTRUCT_CHECKS
static_assert(offsetof(SIMULATIONMASTER_struct, INIT_DONE) == 0 * sizeof(uint64_t), "invalid INIT_DONE");\
static_assert(offsetof(SIMULATIONMASTER_struct, PRESENCE_READ) == 1 * sizeof(uint64_t), "invalid PRESENCE_READ");\
static_assert(offsetof(SIMULATIONMASTER_struct, PRESENCE_WRITE) == 2 * sizeof(uint64_t), "invalid PRESENCE_WRITE");\
This file has been truncated, but you can view the full file.
diff --git a/src/TimeDate-1.20/t/getdate.t b/src/TimeDate-1.20/t/getdate.t
index 31b577b..82c5850 100644
--- a/src/TimeDate-1.20/t/getdate.t
+++ b/src/TimeDate-1.20/t/getdate.t
@@ -156,7 +156,7 @@ Jul 22 10:00:00 UTC 2002 ;1027332000
!;
require Time::Local;
-my $offset = Time::Local::timegm(0,0,0,1,0,70);
+my $offset = Time::Local::timegm(0,0,0,1,0,1970);
diff --git a/src/TimeDate-1.20/t/getdate.t b/src/TimeDate-1.20/t/getdate.t
index 31b577b..82c5850 100644
--- a/src/TimeDate-1.20/t/getdate.t
+++ b/src/TimeDate-1.20/t/getdate.t
@@ -156,7 +156,7 @@ Jul 22 10:00:00 UTC 2002 ;1027332000
!;
require Time::Local;
-my $offset = Time::Local::timegm(0,0,0,1,0,70);
+my $offset = Time::Local::timegm(0,0,0,1,0,1970);
/dts-v1/;
/ {
compatible = "econet,en7523";
interrupt-parent = <0x01>;
#address-cells = <0x01>;
#size-cells = <0x01>;
chosen {
bootargs = "root=/dev/mtdblock3 ro console=ttyS0,115200n8 earlycon init=/sbin/init";
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 9 columns, instead of 1. in line 8.
Benchmark,Intel DMP OFF,,,Default,,,Wall time Ratio,User Ratio
,wall,user,system,wall,user,system,,
time ./bfs -f benchmark/graphs/twitter.sg -n64 > benchmark/out/bfs-twitter.out,18.25,464.76,11.55,31.33,505.97,15.37,0.582508777529525,0.918552483348815
time ./pr -f benchmark/graphs/twitter.sg -i1000 -t1e-4 -n16 > benchmark/out/pr-twitter.out,177.38,5296.91,7.53,179.09,5445.54,7.23,0.990451728181361,0.972706104445106
time ./cc -f benchmark/graphs/twitter.sg -n16 > benchmark/out/cc-twitter.out,4.95,97.37,5.76,4.96,95.26,5.5,0.997983870967742,1.02214990552173
time ./bc -f benchmark/graphs/twitter.sg -i4 -n16 > benchmark/out/bc-twitter.out,172.66,5027.26,31.84,166.5,4882.11,37.98,1.036996996997,1.02973099745807
time ./bfs -f benchmark/graphs/web.sg -n64 > benchmark/out/bfs-web.out,44.9,834.17,16.53,45.69,843.93,17.74,0.982709564456117,0.98843505977984
time ./pr -f benchmark/graphs/web.sg -i1000 -t1e-4 -n16 > benchmark/out/pr-web.out,53.99,1458.04,7.68,59.13,1611.01,7.29,0.91307289024184,0.905047144338024
time ./c
Benchmark Local-Base Remote-Base Local-Peak Remote-Peak Base Ratio Peak Ratio
600.perlbench_s 6.443885 6.401963 7.026743 6.979114 1.00654830401238 1.00682450523089
602.gcc_s 9.370256 8.243327 10.057868 8.713593 1.1367080306289 1.15427332903889
605.mcf_s 6.961765 6.113316 7.593191 6.561309 1.13878703472878 1.15726770374631
620.omnetpp_s 5.763463 5.169357 6.872515 6.079968 1.11492841372728 1.13035381107269
623.xalancbmk_s 6.499653 6.420615 6.73422 6.677672 1.01231003572088 1.00846822066133
625.x264_s 9.541702 9.421099 9.950947 9.837194 1.01280137274855 1.01156356172299
631.deepsjeng_s 3.925493 3.553373 4.335625 3.895072 1.10472303357964 1.1131052262962
641.leela_s 3.502438 3.49985 3.758943 3.753351 1.00073946026258 1.00148986865337
648.exchange2_s 9.506407 9.502887 8.252384 8.711367 1.000370413749 0.947312172704927