summaryrefslogtreecommitdiffstats
path: root/apps/core_asmdefs.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-07-13 00:40:35 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-07-13 00:40:35 +0000
commit668a769ca4cabdfee54dc53e92a964c32c9738d7 (patch)
treea4c42168e4b86d4b7e09533307ae070fd3c7bcc0 /apps/core_asmdefs.c
parent36eeecbe9a91a5da8bd82ee3974c359f4534dd14 (diff)
downloadrockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.tar.gz
rockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.zip
Add new asmdefs mechanism for exporting information only available to the C compiler for use in asm files, and use it in arm jpeg idct. See apps/apps.make, apps/core_asmdefs.c, and apps/recorder/jpeg_idct_arm.S for details.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/core_asmdefs.c')
-rw-r--r--apps/core_asmdefs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/core_asmdefs.c b/apps/core_asmdefs.c
new file mode 100644
index 0000000000..f0847b2254
--- /dev/null
+++ b/apps/core_asmdefs.c
@@ -0,0 +1,17 @@
+#include <config.h>
+#include <bmp.h>
+
+/* To export a value for use in assembly files, define an int or unsigned here
+ * named AD_<name> and include apps/core_asmdefs.h in the assembly file.
+ * Identifiers without the AD_ prefix will be ignored, and can be used to
+ * create instances of structs for finding offsets to individual members.
+ */
+
+
+/* Size of a pixel with 8-bit components. */
+const int AD_pix8_size =
+#ifdef HAVE_LCD_COLOR
+ sizeof(struct uint8_rgb);
+#else
+ 1;
+#endif