diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2017-02-23 22:41:04 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2017-02-23 22:41:35 +0100 |
commit | ebbc17fb5fe384349f39560006681628d47069a3 (patch) | |
tree | 33e891c2aba4e937aa140951ff1e9ba61db17fcb /pcm-assembler/pcm-assembler.h | |
parent | 6e60012b1b3bd66b9ec96efb76496ea4dc2b8b0c (diff) | |
download | mt8173-pcm-tools-ebbc17fb5fe384349f39560006681628d47069a3.tar.gz mt8173-pcm-tools-ebbc17fb5fe384349f39560006681628d47069a3.tar.bz2 mt8173-pcm-tools-ebbc17fb5fe384349f39560006681628d47069a3.zip |
MT8173 PCM assembler introduction
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'pcm-assembler/pcm-assembler.h')
-rw-r--r-- | pcm-assembler/pcm-assembler.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/pcm-assembler/pcm-assembler.h b/pcm-assembler/pcm-assembler.h new file mode 100644 index 0000000..ef7a655 --- /dev/null +++ b/pcm-assembler/pcm-assembler.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2016-2017 Paul Kocialkowski <contact@paulk.fr> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _PCM_ASSEMBLER_H_ +#define _PCM_ASSEMBLER_H_ + +/* + * Values + */ + +#define PCM_ASSEMBLER_ARGUMENTS_MAX 64 + +/* + * Structures + */ + +struct pcm_label_address { + char *label; + unsigned int address; +}; + +struct pcm_func_address { + char *func; + unsigned int address; + + struct list_head *label_address; +}; + +struct pcm_ops_data { + struct list_head *func_address; + struct list_head *func_address_current; + + int fd; +}; + +/* + * Functions + */ + +int pcm_asm_write(void *data, unsigned int value, char *mnemonic); +int pcm_asm_write_dummy(void *data, unsigned int value, char *mnemonic); +int pcm_func_address(void *data, char *func); +int pcm_label_address(void *data, char *func); +int pcm_address_dummy(void *data, char *string); + +int pcm_func_address_register(char *func, unsigned int address); +void pcm_func_address_flush(void); +struct pcm_func_address *pcm_func_address_find(char *func); +int pcm_func_address_current_set(char *func); +int pcm_label_address_register(char *label, unsigned int address); +void pcm_label_address_flush(void); +struct pcm_label_address *pcm_label_address_find(char *label); + +#endif |