summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AVR
diff options
context:
space:
mode:
authorDylan McKay <me@dylanmckay.io>2017-09-11 10:32:51 +0000
committerDylan McKay <me@dylanmckay.io>2017-09-11 10:32:51 +0000
commit0fc5fe0a58f995f350b6adef070cc80528e796aa (patch)
treed6f65b33b807fde9d63832b42326b444866f7772 /llvm/test/CodeGen/AVR
parent3b0b50bac5d34c7ffc716478e8c13b627f49af36 (diff)
downloadbcm5719-llvm-0fc5fe0a58f995f350b6adef070cc80528e796aa.tar.gz
bcm5719-llvm-0fc5fe0a58f995f350b6adef070cc80528e796aa.zip
[AVR] Enable the '__do_copy_data' function
Also enables '__do_clear_bss'. These functions are automaticalled called by the CRT if they are declared. We need these to be called otherwise RAM will start completely uninitialised, even though we need to copy RAM variables from progmem to RAM. llvm-svn: 312905
Diffstat (limited to 'llvm/test/CodeGen/AVR')
-rw-r--r--llvm/test/CodeGen/AVR/clear-bss.ll5
-rw-r--r--llvm/test/CodeGen/AVR/copy-data-to-ram.ll5
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AVR/clear-bss.ll b/llvm/test/CodeGen/AVR/clear-bss.ll
new file mode 100644
index 00000000000..9c63815c098
--- /dev/null
+++ b/llvm/test/CodeGen/AVR/clear-bss.ll
@@ -0,0 +1,5 @@
+; RUN: llc < %s -march=avr | FileCheck %s
+
+; CHECK: .globl __do_clear_bss
+@zeroed = internal constant [3 x i8] zeroinitializer
+
diff --git a/llvm/test/CodeGen/AVR/copy-data-to-ram.ll b/llvm/test/CodeGen/AVR/copy-data-to-ram.ll
new file mode 100644
index 00000000000..021cc0f1a7f
--- /dev/null
+++ b/llvm/test/CodeGen/AVR/copy-data-to-ram.ll
@@ -0,0 +1,5 @@
+; RUN: llc < %s -march=avr | FileCheck %s
+
+; CHECK: .globl __do_copy_data
+@str = internal global [3 x i8] c"foo"
+
OpenPOWER on IntegriCloud