Skip to content

Instantly share code, notes, and snippets.

View pftbest's full-sized avatar

Vadzim Dambrouski pftbest

View GitHub Profile
From b239677c8dd4a574ab7407a4a2539d3f15857c91 Mon Sep 17 00:00:00 2001
From: Vadzim Dambrouski <[email protected]>
Date: Thu, 18 May 2017 20:51:55 +0300
Subject: [PATCH] [MSP430] Add subtarget features for hardware multiplier.
---
lib/Target/MSP430/MSP430.td | 15 ++++++++++++++-
lib/Target/MSP430/MSP430ISelLowering.cpp | 27 +++------------------------
lib/Target/MSP430/MSP430Subtarget.cpp | 27 ++++++++++++++++++++++++++-
lib/Target/MSP430/MSP430Subtarget.h | 11 +++++++++++
/usr/local/lib/ruby/gems/2.4.0/gems/builder-3.2.2/lib/builder/xchar.rb:111: warning: constant ::Fixnum is deprecated
dslite2svd.rb:160:in `block (10 levels) in <main>': Unexpected non-empty resetval in #<Oga::XML::Element:0x007fbf0f55b790> (RuntimeError)
from /usr/local/lib/ruby/gems/2.4.0/gems/builder-3.2.2/lib/builder/xmlbase.rb:175:in `_nested_structures'
from /usr/local/lib/ruby/gems/2.4.0/gems/builder-3.2.2/lib/builder/xmlbase.rb:68:in `tag!'
from /usr/local/lib/ruby/gems/2.4.0/gems/builder-3.2.2/lib/builder/xmlbase.rb:93:in `method_missing'
from dslite2svd.rb:150:in `block (9 levels) in <main>'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `block in each'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `each'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `each'
from dslite2svd.rb:149:in `block (8 levels) in <main>'
/usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/element.rb:343:in `split_name': Interrupt
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/element.rb:70:in `attribute'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/element.rb:89:in `get'
from dslite2svd.rb:23:in `block in common_id_prefix'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `block in each'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `each'
from /usr/local/lib/ruby/gems/2.4.0/gems/oga-2.10/lib/oga/xml/node_set.rb:56:in `each'
from dslite2svd.rb:22:in `common_id_prefix'
from dslite2svd.rb:120:in `block (4 levels) in <main>'
from /usr/local/lib/ruby/gems/2.4.0/gems/builder-3.2.2/lib/builder/xmlbase.rb:175:in `_nested_structures'
; Function Attrs: noinline norecurse nounwind readnone
define i32 @u32_ge_u32_or(i32, i32) unnamed_addr #1 {
start:
%2 = icmp ult i32 %0, %1
%3 = or i32 %1, %0
%_0.0 = select i1 %2, i32 0, i32 %3
ret i32 %_0.0
}
attributes #1 = { noinline norecurse nounwind readnone }
#![feature(test)]
extern crate test;
use test::Bencher;
use std::mem;
fn break_patterns1<T>(v: &mut [T]) {
let len = v.len();
if len >= 8 {
macbook:rust-lang vadzim$
macbook:rust-lang vadzim$ ./configure --enable-llvm-assertions --enable-llvm-release-debuginfo
configure: looking for configure programs
configure: found program 'cmp'
configure: found program 'mkdir'
configure: found program 'printf'
configure: found program 'cut'
configure: found program 'head'
configure: found program 'grep'
configure: found program 'xargs'
#[allow(unused_parens)]
fn main() {
let mut left_edge;
let mut right_edge;
let mut top_edge;
let mut bottom_edge;
let mut max_iter;
let mut x_step;
let mut y_step;
#include <stdio.h>
int main() {
int left_edge, right_edge, top_edge, bottom_edge, max_iter, x_step, y_step,
y0, x0, x, y, i, x_x, y_y, temp, the_char, accum, count;
accum = 0;
count = 0;
while (count < 1545) {
left_edge = -420;
user@archserv ~/trie-cpp $ ./a.out
trie/trie.cpp:141:2: runtime error: store to misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
0x7ffd0d2362d1: note: pointer points here
00 00 00 20 00 20 00 01 00 00 00 10 00 05 00 00 00 18 00 68 65 6c 6c 6f 00 00 00 01 00 00 00 00
^
trie/trie.cpp:145:42: runtime error: load of misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
0x7ffd0d2362d1: note: pointer points here
00 00 00 20 23 00 00 01 00 00 00 10 00 05 00 00 00 18 00 68 65 6c 6c 6f 00 00 00 01 00 00 00 00
^
trie/trie.cpp:146:31: runtime error: load of misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
user@archserv ~/trie-cpp $ make
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/main.cpp -o trie/main.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/stdafx.cpp -o trie/stdafx.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/tests.cpp -o trie/tests.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/trie.cpp -o trie/trie.o
trie/trie.cpp:126:31: warning: comparison of constant 65535 with expression of type 'short' is always false
[-Wtautological-constant-out-of-range-compare]
if (trie_header->items_count == UINT16_MAX)
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
trie/trie.cpp:368:25: warning: array subscript is of type 'char' [-Wchar-subscripts]