Skip to content

Instantly share code, notes, and snippets.

🤷‍♂
¯\_(ツ)_/¯

Pat Gavlin pgavlin

🤷‍♂
¯\_(ツ)_/¯
Block or report user

Report or block pgavlin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pgavlin
pgavlin / gtemu.c
Last active Apr 27, 2019
Emulating a GT1 on a GT1 using a very, very slightly modified gtemu.c
View gtemu.c
#define NULL 0
typedef unsigned uint16_t;
typedef unsigned char uint8_t;
void cls();
void putchar(uint8_t c);
typedef struct { // TTL state that the CPU controls
uint16_t PC;
@pgavlin
pgavlin / index.generated.ts
Last active Nov 11, 2019
Terraform to Pulumi migration
View index.generated.ts
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const config = new pulumi.Config();
const var_availability_zones = config.require("availabilityZones");
const var_public_key = config.get("publicKey") || "";
const aws_security_group_default = new aws.ec2.SecurityGroup("default", {
namePrefix: "example_sg",
View format-michal.patch
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 5c21f08..2555e1f 100644
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -1389,202 +1389,202 @@ GenTreePtr Compiler::impAssignStructPtr(GenTreePtr destAddr,
Given a struct value, and the class handle for that structure, return
the expression for the address for that structure value.
willDeref - does the caller guarantee to dereference the pointer.
*/
@pgavlin
pgavlin / ghquery.py
Created Oct 19, 2016
Query GitHub issues
View ghquery.py
#!/usr/bin/env python
from __future__ import print_function
import argparse, csv, itertools, json, os, requests, sys, urllib
from datetime import datetime
def write_csv(writer, milestone):
for i in milestone['issues']:
row = { 'Issue Number': i['number'], 'Description': i['title'], 'Assigned To': i['assignees_list'], 'Link': i['url'], 'Milestone': milestone['title'] }
View jitdump_7236.txt
BEGIN EXECUTION
"c:\dev\coreclr\bin\tests\Windows_NT.x86.Checked\Tests\Core_Root\corerun.exe" _speed_dbgunsafe-4.exe
****** START compiling TestApp:test_25(int,ref,long,ubyte):long (MethodHash=e5bcc669)
Generating code for Windows x86
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = false
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = false
View gh7038_jit32.s
; Assembly listing for method Program:Test(ref,ref)
; Emitting BLENDED_CODE for generic X86 CPU
; optimized code
; ebp based frame
; fully interruptible
; Final local variable assignments
;
; V00 arg0 [V00,T03] ( 3, 4 ) ref -> ebx
; V01 arg1 [V01,T02] ( 3, 4 ) ref -> edi
; V02 loc0 [V02,T00] ( 5, 15 ) int -> esi
View gh7038_ryujit.s
; Assembly listing for method Program:Test(ref,ref)
; Emitting BLENDED_CODE for generic X86 CPU
; optimized code
; ebp based frame
; fully interruptible
; Final local variable assignments
;
; V00 arg0 [V00,T02] ( 4, 7 ) ref -> ecx
; V01 arg1 [V01,T03] ( 4, 7 ) ref -> edx
; V02 loc0 [V02,T00] ( 8, 29 ) int -> eax
View lowerxarch.cpp.patch
diff --git a/src/jit/lowerxarch.cpp b/src/jit/lowerxarch.cpp
index 389f9a5..a1e3aa3 100644
--- a/src/jit/lowerxarch.cpp
+++ b/src/jit/lowerxarch.cpp
@@ -239,9 +239,9 @@ void Lowering::TreeNodeInfoInit(GenTree* tree)
#if !defined(_TARGET_64BIT_)
case GT_LONG:
- if (tree->gtNext == nullptr)
+ if ((tree->gtLIRFlags & LIR::Flags::IsUnusedValue) != 0)
View castDecomp.patch
diff --git a/src/jit/decomposelongs.cpp b/src/jit/decomposelongs.cpp
index 15198e3..35dea9d 100644
--- a/src/jit/decomposelongs.cpp
+++ b/src/jit/decomposelongs.cpp
@@ -409,7 +409,7 @@ GenTree* DecomposeLongs::DecomposeStoreLclVar(LIR::Use& use)
// itself should not have any. The lo and hi rhs parts could, at least
// in theory, have different side effects so we can't simply copy the
// original store's side effecs to both parts.
- unsigned flags = tree->gtFlags & ~GTF_ALL_EFFECT;
+ unsigned flags = (tree->gtFlags & ~GTF_ALL_EFFECT) | GTF_ASG;
@pgavlin
pgavlin / gist:cd9f77ff5115d3d60085
Last active Aug 29, 2015
LLILC patch to normalize bad X86-64 calling conventions
View gist:cd9f77ff5115d3d60085
diff --git a/lib/Reader/abisignature.cpp b/lib/Reader/abisignature.cpp
index 140c248..55e8635 100644
--- a/lib/Reader/abisignature.cpp
+++ b/lib/Reader/abisignature.cpp
@@ -42,6 +42,21 @@ static CallingConv::ID getLLVMCallingConv(CorInfoCallConv CC) {
}
}
+static CorInfoCallConv
+getNormalizedCallingConvention(const ReaderCallSignature &Signature) {
You can’t perform that action at this time.