gcc/libgcc/config/spu/cache.S

44 lines
1.3 KiB
ArmAsm
Raw Normal View History

/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
config.gcc (spu-*-elf*): Add spu_cache.h to extra_headers. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * config.gcc (spu-*-elf*): Add spu_cache.h to extra_headers. * config/spu/spu_cache.h: New file. * config/spu/cachemgr.c: New file. * config/spu/cache.S: New file. * config/spu/spu.h (ASM_OUTPUT_SYMBOL_REF): Define. (ADDR_SPACE_EA): Define. (TARGET_ADDR_SPACE_KEYWORDS): Define. * config/spu/spu.c (EAmode): New macro. (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Likewise. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ASM_SELECT_SECTION): Likewise. (TARGET_ASM_UNIQUE_SECTION): Likewise. (TARGET_ASM_UNALIGNED_SI_OP): Likewise. (TARGET_ASM_ALIGNED_DI_OP): Likewise. (ea_symbol_ref): New function. (spu_legitimate_constant_p): Handle __ea qualified addresses. (spu_addr_space_legitimate_address_p): New function. (spu_addr_space_legitimize_address): Likewise. (cache_fetch): New global. (cache_fetch_dirty): Likewise. (ea_alias_set): Likewise. (ea_load_store): New function. (ea_load_store_inline): Likewise. (expand_ea_mem): Likewise. (spu_expand_mov): Handle __ea qualified memory references. (spu_addr_space_pointer_mode): New function. (spu_addr_space_address_mode): Likewise. (spu_addr_space_subset_p): Likewise. (spu_addr_space_convert): Likewise. (spu_section_type_flags): Handle "._ea" section. (spu_select_section): New function. (spu_unique_section): Likewise. * config/spu/spu-c.c (spu_cpu_cpp_builtins): Support __EA32__ and __EA64__ predefined macros. * config/spu/spu-elf.h (LIB_SPEC): Handle -mcache-size= and -matomic-updates switches. * config/spu/t-spu-elf (MULTILIB_OPTIONS): Define. (EXTRA_MULTILIB_PARTS): Add libgcc_cachemgr.a, libgcc_cachemgr_nonatomic.a, libgcc_cache8k.a, libgcc_cache16k.a, libgcc_cache32k.a, libgcc_cache64k.a, libgcc_cache128k.a. ($(T)cachemgr.o, $(T)cachemgr_nonatomic.o): New target. ($(T)cache8k.o, $(T)cache16k.o, $(T)cache32k.o, $(T)cache64k.o, $(T)cache128k.o): Likewise. ($(T)libgcc_%.a): Likewise. * config/spu/spu.h (TARGET_DEFAULT): Add MASK_ADDRESS_SPACE_CONVERSION. * config/spu/spu.opt (-mea32/-mea64): Add switches. (-maddress-space-conversion): Likewise. (-mcache-size=): Likewise. (-matomic-updates): Likewise. * doc/invoke.texi (-mea32/-mea64): Document. (-maddress-space-conversion): Likewise. (-mcache-size=): Likewise. (-matomic-updates): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153575
2009-10-26 22:59:17 +01:00
This file is part of GCC.
GCC 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, or (at your option) any later
version.
GCC 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
.data
.p2align 7
.global __cache
__cache:
.rept __CACHE_SIZE__ * 8
.fill 128
.endr
.p2align 7
.global __cache_tag_array
__cache_tag_array:
.rept __CACHE_SIZE__ * 2
.long 1, 1, 1, 1
.fill 128-16
.endr
__end_cache_tag_array:
.globl __cache_tag_array_size
.set __cache_tag_array_size, __end_cache_tag_array-__cache_tag_array