aboutsummaryrefslogtreecommitdiffstats
path: root/target-arm
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-06-03 12:16:00 +0200
committerDavid 'Digit' Turner <digit@android.com>2011-06-03 22:07:58 +0200
commit3011b40fe40c7261c2c838d0037157dee556face (patch)
tree8048dcb96179cdb206252c871459235faffd0e3b /target-arm
parent57d4bd5c264e056bd4a4fe2aff19e46f8f3059f1 (diff)
downloadexternal_qemu-3011b40fe40c7261c2c838d0037157dee556face.zip
external_qemu-3011b40fe40c7261c2c838d0037157dee556face.tar.gz
external_qemu-3011b40fe40c7261c2c838d0037157dee556face.tar.bz2
target-arm: move vstrcpy() to helper-android.c
Change-Id: I76844f4f61ddc26832344d3fb03fb2dd33a93c07
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper-android.c14
-rw-r--r--target-arm/op_helper.c13
2 files changed, 14 insertions, 13 deletions
diff --git a/target-arm/helper-android.c b/target-arm/helper-android.c
index 8c203d4..d5f3b52 100644
--- a/target-arm/helper-android.c
+++ b/target-arm/helper-android.c
@@ -9,6 +9,20 @@
#include "helper-android.h"
#include "qemu-common.h"
+/* copy a string from the simulated virtual space to a buffer in QEMU */
+void vstrcpy(target_ulong ptr, char *buf, int max)
+{
+ int index;
+
+ if (buf == NULL) return;
+
+ for (index = 0; index < max; index += 1) {
+ cpu_physical_memory_read(ptr + index, (uint8_t*)buf + index, 1);
+ if (buf[index] == 0)
+ break;
+ }
+}
+
#ifdef CONFIG_TRACE
#include "android-trace.h"
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
index bfb6be5..fc06536 100644
--- a/target-arm/op_helper.c
+++ b/target-arm/op_helper.c
@@ -134,19 +134,6 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
env = saved_env;
}
-/* copy a string from the simulated virtual space to a buffer in QEMU */
-void vstrcpy(target_ulong ptr, char *buf, int max)
-{
- int index;
-
- if (buf == NULL) return;
-
- for (index = 0; index < max; index += 1) {
- cpu_physical_memory_read(ptr + index, (uint8_t*)buf + index, 1);
- if (buf[index] == 0)
- break;
- }
-}
#endif
/* FIXME: Pass an axplicit pointer to QF to CPUState, and move saturating